We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e9fd70 commit 279c284Copy full SHA for 279c284
setup.py
@@ -6,9 +6,11 @@
6
# For development and local builds use this version number, but for real builds replace it
7
# with the tag found in the environment
8
package_version = "4.0.0.dev0"
9
-for variable_name in ['BITBUCKET_TAG']:
10
- package_version = os.environ.get(variable_name, package_version)
11
- package_version = package_version.lstrip('v')
+if 'BITBUCKET_TAG' in os.environ:
+ package_version = os.environ['BITBUCKET_TAG'].lstrip('v')
+elif 'BUILD_SOURCEBRANCH' in os.environ:
12
+ full_tag_prefix = 'refs/tags/v'
13
+ package_version = os.environ['BUILD_SOURCEBRANCH'][len(full_tag_prefix):]
14
15
16
setup(
0 commit comments