Skip to content

Commit

Permalink
.github: ensure the leading 'v' in version is retained
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
  • Loading branch information
troglobit committed Nov 30, 2023
1 parent 10ece43 commit 14be582
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# This job can be started by a git tag or using the workflow dispatch.
#
# The version string *must* be of the format: vYY.MM(-alphaN|-betaN|-rcN)
#
# In /etc/os-release this string is used for VERSION, VERSION_ID, and
# IMAGE_VERSION, with the 'v' prefix. In release artifact filenames,
# and zip file directory names, the 'v' is dropped per convention.
name: Release General

on:
Expand Down Expand Up @@ -28,18 +35,19 @@ jobs:
if [ -n "${{ inputs.version }}" ]; then
ver=${{ inputs.version }}
else
ver=${GITHUB_REF#refs/tags/v}
ver=${GITHUB_REF#refs/tags/}
fi
echo "ver=${ver}" >> $GITHUB_OUTPUT
if echo $ver | grep -qE '[0-9.]+(-alpha|-beta|-rc)[0-9]*'; then
if echo $ver | grep -qE 'v[0-9\.]+(-alpha|-beta|-rc)[0-9]*'; then
echo "pre=true" >> $GITHUB_OUTPUT
else
echo "pre=false" >> $GITHUB_OUTPUT
fi
fver=${ver#v}
if [ "${{ matrix.variant }}" = "netconf" ]; then
target=${{ matrix.platform }}-${ver}
target=${{ matrix.platform }}-${fver}
else
target=${{ matrix.platform }}-${{ matrix.variant }}-${ver}
target=${{ matrix.platform }}-${{ matrix.variant }}-${fver}
fi
echo "dir=infix-$target" >> $GITHUB_OUTPUT
echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 14be582

Please sign in to comment.