Updated version handling

This commit is contained in:
2026-02-14 15:10:18 +01:00
parent e161c2dcf0
commit 26ee3dfb44

View File

@@ -6,6 +6,10 @@ inputs:
description: "Suffix for version (e.g. dev, alpha, beta)"
required: false
default: ""
suffix_separator:
description: "Separator between version and suffix (either '.' or '-')"
required: false
default: "-"
runs:
using: "composite"
@@ -33,11 +37,10 @@ runs:
fi
VERSION_SUFFIX="${{ inputs.version_suffix }}"
SUFFIX_SEPARATOR="${{ inputs.suffix_separator }}"
if [ -n "$VERSION_SUFFIX" ] && [ "$VERSION_SUFFIX" = "dev" ]; then
BUILD_VERSION="${DATE}.dev${BUILD_NUMBER}"
elif [ -n "$VERSION_SUFFIX" ]; then
BUILD_VERSION="${DATE}.${BUILD_NUMBER}${VERSION_SUFFIX}"
if [ -n "$VERSION_SUFFIX" ]; then
BUILD_VERSION="${DATE}.${BUILD_NUMBER}${SUFFIX_SEPARATOR}${VERSION_SUFFIX}"
else
BUILD_VERSION="${DATE}.${BUILD_NUMBER}"
fi