diff options
author | Sebastien Blaisot <sebastien@blaisot.org> | 2016-11-23 10:36:55 +0100 |
---|---|---|
committer | Sebastien Blaisot <sebastien@blaisot.org> | 2016-11-23 10:36:55 +0100 |
commit | 7f9a55c15d08912d9e44655e3354cc2828243b71 (patch) | |
tree | aeb4db6b4325e9809d5dc1c840b03113ccebe8c6 /build/util.py | |
parent | 6b552ebb384f0592c673acd26b35f850c02530c0 (diff) |
Fix package naming collision from appveyor
Add PR# to branch name if building a PR in appveyor
Diffstat (limited to 'build/util.py')
-rw-r--r-- | build/util.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/build/util.py b/build/util.py index c7c74e927c..53c904e449 100644 --- a/build/util.py +++ b/build/util.py @@ -93,6 +93,10 @@ def get_git_branch_name(): if branch_name == 'HEAD': # Use APPVEYOR_REPO_BRANCH variable if building on appveyor or (no branch) if unset branch_name = os.getenv("APPVEYOR_REPO_BRANCH", '(no branch)') + # Add PR# to branch name if building a PR in appveyor to avoid package naming collision + PRnum = os.getenv("APPVEYOR_PULL_REQUEST_NUMBER") + if PRnum != None: + branch_name += ("-PR" + PRnum) return branch_name |