Use github ref name only for release

This commit is contained in:
Spitap
2023-04-22 19:10:20 +02:00
parent 66d90f6e67
commit 2b47cbbc87
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -174,6 +174,8 @@ jobs:
yarn build
cd ..
- name: Build packages
env:
IS_RELEASE: yes
run: |
sudo apt-get install librrd-dev rrdtool libssl-dev
python -m pip install --upgrade pip build
+2 -1
View File
@@ -8,7 +8,8 @@ def local_scheme(version):
def get_version():
from setuptools_scm import get_version as default_version
github_version = os.environ.get('GITHUB_REF_NAME', None)
if github_version is not None:
is_release = os.environ.get('IS_RELEASE', None)
if is_release is not None and github_version is not None:
return github_version
return default_version(local_scheme=local_scheme)