From 252c3ff59a4d7b49647125aa2fa8a7b12acb46d1 Mon Sep 17 00:00:00 2001 From: Antony Lewis Date: Thu, 6 Jun 2024 09:17:30 +0100 Subject: [PATCH] update [pypi] --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9059b221..a7b0a92b 100644 --- a/setup.py +++ b/setup.py @@ -279,8 +279,9 @@ def find_version(): version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M) if version_match: version = version_match.group(1) + print("Run number %s" % os.getenv('GITHUB_RUN_NUMBER')) commit = os.getenv('GITHUB_RUN_NUMBER') - if commit and not os.getenv('TRAVIS_TAG'): + if commit and not os.getenv('GITHUB_REF', '').startswith('refs/tags/'): version += '.' + commit return version raise RuntimeError("Unable to find version string.")