mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 20:56:49 +00:00
fix: Munge version names better
This commit is contained in:
1 parent
8904afa4da
commit
ac188a2375
1 file changed
+2
-2
@@ -68,7 +68,7 @@ jobs:
|
||||
- name: Get package version and component
|
||||
id: package-meta
|
||||
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
|
||||
# apt's repository config like a git repo branch
|
||||
if [[ "${{ forge.ref }}" == "refs/tags/"* ]]; then
|
||||
@@ -81,7 +81,7 @@ jobs:
|
||||
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)
|
||||
COMPONENT=$(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"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user