diff options
author | Sebastien Blaisot <sebastien@blaisot.org> | 2016-11-22 23:36:25 +0100 |
---|---|---|
committer | Sebastien Blaisot <sebastien@blaisot.org> | 2016-11-23 01:26:26 +0100 |
commit | 01b95cb1796e145472a01816e4fc7c3f7bd4d68b (patch) | |
tree | 111456928451033c70db610cdd66d92eb2092fae /build/util.py | |
parent | b7323423fa11acde7c5b2909d6f8447774e18e79 (diff) |
Take branch name from env variable when built on appveyor in detached head state
Diffstat (limited to 'build/util.py')
-rw-r--r-- | build/util.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/build/util.py b/build/util.py index ce7682c32a..c7c74e927c 100644 --- a/build/util.py +++ b/build/util.py @@ -91,7 +91,8 @@ def get_git_branch_name(): branch_name = os.popen( "git rev-parse --abbrev-ref HEAD").readline().strip() if branch_name == 'HEAD': - branch_name = '(no branch)' + # Use APPVEYOR_REPO_BRANCH variable if building on appveyor or (no branch) if unset + branch_name = os.getenv("APPVEYOR_REPO_BRANCH", '(no branch)') return branch_name @@ -127,7 +128,7 @@ def get_mixxx_version(): versionMask = '^\d+\.\d+\.\d+([-~].+)?$' if not re.match(versionMask, version): raise ValueError("Version format mismatch. See src/defs_version.h comment") - + return version @@ -157,7 +158,7 @@ def CheckForPKGConfig(context, version='0.0.0'): context.Result(ret) return ret - + # Uses pkg-config to check for a minimum version def CheckForPKG(context, name, version=""): if version == "": |