updatet regex pattern to support postfix
Some checks failed
Native CMake Build / Configure and build using cmake (push) Failing after 3s

This commit is contained in:
mazzol_a 2025-04-23 17:09:06 +02:00
parent 99735c3ee5
commit bace9edf89
4 changed files with 5 additions and 6 deletions

View File

@ -33,7 +33,7 @@ jobs:
run: conda config --set anaconda_upload no
- name: Build
run: conda build ./conda-recipes/python-client --output-folder build_output
run: conda build conda-recipes/python-client --output-folder build_output
- name: Upload all Conda packages
uses: actions/upload-artifact@v4

View File

@ -1,7 +1,7 @@
source:
path: ../..
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+\.\d+\.\d+)').group(1) %}
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+\.\d+\.\d+(?:[\.\-][\.\w\-]+)?)').group(1) %}
package:
name: sls_detector_software
version: {{ version }} #2025.3.19

View File

@ -1,8 +1,7 @@
source:
path: ../..
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+\.\d+\.\d+)').group(1) %}
{% set version = load_file_regex(load_file = 'VERSION', regex_pattern = '(\d+\.\d+\.\d+(?:[\.\w\-]+)?)').group(1) %}
package:
name: slsdet
version: {{ version }} #

View File

@ -17,8 +17,8 @@ def get_version():
version = sys.argv[1]
# Validate that the version argument matches semantic versioning format (X.Y.Z)
if not re.match(r'^\d+\.\d+\.\d+$', version):
print("Error: Version argument must be in semantic versioning format (X.Y.Z)")
if not re.match(r'^\d+\.\d+\.\d+(?:[\-\.][\.\w\-]+)?+$', version):
print("Error: Version argument must be in semantic versioning format (X.Y.Z[./-][postfix])")
sys.exit(1)
return version