From c20dfbbc39d58f5ea0006508d058c67a004d883f Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Thu, 19 Sep 2024 16:05:45 +0200 Subject: [PATCH] Build .dev1 packages on non-master branches --- tests/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 697a9396..3f28360c 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -66,6 +66,8 @@ def get_git_version(cwd): def get_version(cwd): git_version = get_git_version(cwd) + git_branch = check_output(["git", "branch", "--show-current"], cwd=cwd).decode("utf-8").strip() + version = git_version[1:].split("-") if len(version) > 2: @@ -73,7 +75,7 @@ def get_version(cwd): if len(version) > 1: version = ".post".join(version) if is_dev_build(): - version += ".dev0" + version += ".dev0" if git_branch in ['', 'master'] else '.dev1' else: version = version[0]