mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-09 19:13:03 +02:00
fix: Munge version names better
This commit is contained in:
parent
67810682cd
commit
980b39c946
1 changed files with 2 additions and 2 deletions
|
@ -68,7 +68,7 @@ jobs:
|
||||||
- name: Get package version and component
|
- name: Get package version and component
|
||||||
id: package-meta
|
id: package-meta
|
||||||
run: |
|
run: |
|
||||||
BASE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r ".packages[] | select(.name == \"conduwuit\").version" | sed 's/~/-/g')
|
BASE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r ".packages[] | select(.name == \"conduwuit\").version" | sed 's/[^a-zA-Z0-9.+]/~/g')
|
||||||
# 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
|
||||||
|
@ -81,7 +81,7 @@ jobs:
|
||||||
COMPONENT="dev"
|
COMPONENT="dev"
|
||||||
else
|
else
|
||||||
# Use sanitized ref name for the component
|
# 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)
|
COMPONENT=$(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"
|
VERSION="$BASE_VERSION~git$DATE.$SHA-$COMPONENT"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue