Merge pull request #2961 from modoboa/updated-version

better job handling
This commit is contained in:
Antoine Nguyen
2023-04-22 20:20:40 +02:00
committed by GitHub
2 changed files with 2 additions and 4 deletions
-2
View File
@@ -174,8 +174,6 @@ 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 -2
View File
@@ -8,8 +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)
is_release = os.environ.get('IS_RELEASE', None)
if is_release is not None and github_version is not None:
github_type = os.environ.get('GITHUB_REF_TYPE', None)
if github_version is not None and github_type == "tag":
print(f"GITHUB_REF_NAME found, using version: {github_version}")
return github_version
return default_version(local_scheme=local_scheme)