mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-09 19:13:03 +02:00
fix: Minor component and version format fixes
This commit is contained in:
parent
e7a79b1e03
commit
863239f341
1 changed files with 6 additions and 3 deletions
|
@ -72,18 +72,21 @@ jobs:
|
||||||
# VERSION is the package version, COMPONENT is used in
|
# VERSION is the package version, COMPONENT is used in
|
||||||
# apt's repository config like a git repo branch
|
# apt's repository config like a git repo branch
|
||||||
if [[ "${{ forge.ref }}" == "refs/tags/"* ]]; then
|
if [[ "${{ forge.ref }}" == "refs/tags/"* ]]; then
|
||||||
|
# Use the "stable" component for tagged releases
|
||||||
COMPONENT="stable"
|
COMPONENT="stable"
|
||||||
VERSION=$BASE_VERSION
|
VERSION=$BASE_VERSION
|
||||||
else
|
else
|
||||||
|
# Use the "dev" component for development builds
|
||||||
SHA=$(echo "${{ forge.sha }}" | cut -c1-7)
|
SHA=$(echo "${{ forge.sha }}" | cut -c1-7)
|
||||||
DATE=$(date +%Y%m%d)
|
DATE=$(date +%Y%m%d)
|
||||||
if [ "${{ forge.ref_name }}" = "main" ]; then
|
if [ "${{ forge.ref_name }}" = "main" ]; then
|
||||||
COMPONENT="dev"
|
COMPONENT="dev"
|
||||||
else
|
else
|
||||||
# Use sanitized ref name for the component
|
# Use the sanitized ref name as the component for feature branches
|
||||||
COMPONENT=$(echo "${{ forge.ref_name }}" | sed 's/[^a-zA-Z0-9.+]/~/g' | tr '[:upper:]' '[:lower:]' | cut -c1-30)
|
COMPONENT="dev/$(echo "${{ forge.ref_name }}" | sed 's/[^a-zA-Z0-9.+/]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c1-30)""
|
||||||
fi
|
fi
|
||||||
VERSION="$BASE_VERSION~git$DATE.$SHA-$COMPONENT"
|
CLEAN_COMPONENT=$(echo $COMPONENT | sed 's/[^a-zA-Z0-9.+]/~/g')
|
||||||
|
VERSION="$BASE_VERSION~git$DATE.$SHA-$CLEAN_COMPONENT"
|
||||||
fi
|
fi
|
||||||
echo "component=$COMPONENT" >> $GITHUB_OUTPUT
|
echo "component=$COMPONENT" >> $GITHUB_OUTPUT
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue