mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-09 14:33: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
|
||||
# apt's repository config like a git repo branch
|
||||
if [[ "${{ forge.ref }}" == "refs/tags/"* ]]; then
|
||||
# Use the "stable" component for tagged releases
|
||||
COMPONENT="stable"
|
||||
VERSION=$BASE_VERSION
|
||||
else
|
||||
# Use the "dev" component for development builds
|
||||
SHA=$(echo "${{ forge.sha }}" | cut -c1-7)
|
||||
DATE=$(date +%Y%m%d)
|
||||
if [ "${{ forge.ref_name }}" = "main" ]; then
|
||||
COMPONENT="dev"
|
||||
else
|
||||
# Use sanitized ref name for the component
|
||||
COMPONENT=$(echo "${{ forge.ref_name }}" | sed 's/[^a-zA-Z0-9.+]/~/g' | tr '[:upper:]' '[:lower:]' | cut -c1-30)
|
||||
# Use the sanitized ref name as the component for feature branches
|
||||
COMPONENT="dev/$(echo "${{ forge.ref_name }}" | sed 's/[^a-zA-Z0-9.+/]/-/g' | tr '[:upper:]' '[:lower:]' | cut -c1-30)""
|
||||
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
|
||||
echo "component=$COMPONENT" >> $GITHUB_OUTPUT
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue