summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-05-30 02:55:50 -0400
committerMonty Taylor <mordred@inaugust.com>2013-07-11 22:39:46 -0400
commit137bdc5bdf2803541e50a09fc27fddf720ce79a3 (patch)
treed428d63c54c98a083406398480cda4f36c11630f
parent746b78d637724b369477270f518aa09768c5124e (diff)
downloadpbr-137bdc5bdf2803541e50a09fc27fddf720ce79a3.tar.gz
Support version override with PBR prefix.
For non-OpenStack consumption of PBR, OSLO_PACKAGING_ is a weird version override env var. Change-Id: I8e80bcc5bc56e7950ed5cf0d24657957570134cf
-rw-r--r--pbr/packaging.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py
index 815f060..b72bd89 100644
--- a/pbr/packaging.py
+++ b/pbr/packaging.py
@@ -624,7 +624,9 @@ def get_version(package_name, pre_version=None):
to make a source tarball from a fork of our repo with additional tags in it
that they understand and desire the results of doing that.
"""
- version = os.environ.get("OSLO_PACKAGE_VERSION", None)
+ version = os.environ.get(
+ "PBR_VERSION",
+ os.environ.get("OSLO_PACKAGE_VERSION", None))
if version:
return version
version = _get_version_from_pkg_info(package_name)