diff --git a/.github/workflows/archiver.sh b/.github/workflows/archiver.sh index 41f3a7b63c..b76783fcb5 100755 --- a/.github/workflows/archiver.sh +++ b/.github/workflows/archiver.sh @@ -26,8 +26,17 @@ mkdir ${outdir} outfile=${outdir}/VERSION.txt touch ${outfile} dateformat='%Y-%m-%d_%H:%M:%S UTC' +cudacpp_major=$(cat __init__.py | grep __version__ | sed -r 's/(.*=|\(|\)|,)/ /g' | awk '{print $1}') +cudacpp_minor=$(cat __init__.py | grep __version__ | sed -r 's/(.*=|\(|\)|,)/ /g' | awk '{print $2}') +cudacpp_patch=$(cat __init__.py | grep __version__ | sed -r 's/(.*=|\(|\)|,)/ /g' | awk '{print $3}') +echo "(From CUDACPP_OUTPUT/__init__.py)" +echo "cudacpp (major, minor, patch) = ( ${cudacpp_major}, ${cudacpp_minor}, ${cudacpp_patch} )" +if [ ${cudacpp_major} -lt 0 ] || [ ${cudacpp_major} -gt 99 ]; then echo "ERROR! cudacpp_major is not in the [0,99] range"; exit 1; fi +if [ ${cudacpp_minor} -lt 0 ] || [ ${cudacpp_minor} -gt 99 ]; then echo "ERROR! cudacpp_minor is not in the [0,99] range"; exit 1; fi +if [ ${cudacpp_patch} -lt 0 ] || [ ${cudacpp_patch} -gt 99 ]; then echo "ERROR! cudacpp_patch is not in the [0,99] range"; exit 1; fi +cudacpp_version=$(printf "%1d.%02d.%02d" ${cudacpp_major} ${cudacpp_minor} ${cudacpp_patch}) echo "(From CUDACPP_OUTPUT/__init__.py)" >> ${outfile} -echo "cudacpp_version = $(cat __init__.py | awk '/__version__/{print $3}' | sed 's/(//' | sed 's/)//' | sed 's/,/./g')" >> ${outfile} +echo "cudacpp_version = ${cudacpp_version}" >> ${outfile} echo "mg5_version_minimal = $(cat __init__.py | awk '/minimal_mg5amcnlo_version/{print $3}' | sed 's/(//' | sed 's/)//' | sed 's/,/./g')" >> ${outfile} echo "mg5_version_latest_validated = $(cat __init__.py | awk '/latest_validated_version/{print $3}' | sed 's/(//' | sed 's/)//' | sed 's/,/./g')" >> ${outfile} echo "" >> ${outfile} diff --git a/.github/workflows/archiver.yml b/.github/workflows/archiver.yml index dd2127ffc2..9266c57528 100644 --- a/.github/workflows/archiver.yml +++ b/.github/workflows/archiver.yml @@ -13,8 +13,8 @@ on: push: tags: - # Include version tags such as 'cudacpp_for3.6.0_v1.0.0' or 'cudacpp_for3.6.0_v1.0.0_test001' - # Include version tags such as 'valassi_cudacpp_for3.6.0_v1.0.0' or 'valassi_cudacpp_for3.6.0_v1.0.0_test001' + # Include version tags such as 'cudacpp_for3.6.0_v1.00.00' or 'cudacpp_for3.6.0_v1.00.00_test001' + # Include version tags such as 'valassi_cudacpp_for3.6.0_v1.00.00' or 'valassi_cudacpp_for3.6.0_v1.00.00_test001' - '*cudacpp_for*_v*' # Exclude running tags such as 'cudacpp_for3.6.0_latest' diff --git a/epochX/cudacpp/gitTag.sh b/epochX/cudacpp/gitTag.sh index 7506fc3abc..548f1cd280 100755 --- a/epochX/cudacpp/gitTag.sh +++ b/epochX/cudacpp/gitTag.sh @@ -22,8 +22,8 @@ function usage() { echo "Usage (1): $0 [-f] " echo "Creates a new version tag (from the HEAD of the local branch) and pushes it to the remote repository" - echo "Valid formats for are 'n1.n2.n3' or 'n1.n2.n3_txt' where txt only contains letters or digits" - echo "Version number 'n1.n2.n3' must match that in the CUDACPP_OUTPUT/__init__.py file" + echo "Valid formats for are 'n.nn.nn' or 'n.nn.nn_txt' where txt only contains letters or digits)" + echo "Version number must match the (n1,n2,n3) specified with single digits in the CUDACPP_OUTPUT/__init__.py file" echo "For release tags (no trailing '_txt'), the github CI will then create also a running tag with '_latest' suffix" echo "Use the -f option to delete and recreate a version tag that already exists" echo ""