Skip to content

Commit c8a9524

Browse files
committed
fix pipeline to get proper release version
1 parent a9a903e commit c8a9524

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release-final-boshrelease.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
then
5454
# the trigger does not come from a tag. Not a final version
5555
bosh create-release --tarball="$GITHUB_WORKSPACE/.build/$RELEASE.tgz"
56-
version=$(ls dev_releases/$RELEASE/*.yml | sed 's/.*\/.*-\(.*\)\.yml$/\1/' | sort -t. -k 1,1nr -k 2,2nr | head -1)
56+
version=$(ls dev_releases/$RELEASE/$RELEASE*.yml | sed 's/.*\/.*-\(.*\)\.yml$/\1/' | sort -V | tail -n 1)
5757
echo "type=dev" | tee -a $GITHUB_OUTPUT
5858
else
5959
tag="${GITHUB_REF_NAME}"
@@ -67,7 +67,7 @@ jobs:
6767
echo "Tag does not match version (tag=$tag). Let bosh to calculate the next one"
6868
bosh create-release --final --tarball="$GITHUB_WORKSPACE/.build/$RELEASE.tgz"
6969
fi
70-
version=$(ls releases/$RELEASE/*.yml | sed 's/.*\/.*-\(.*\)\.yml$/\1/' | sort -t. -k 1,1nr -k 2,2nr | head -1)
70+
version=$(ls releases/$RELEASE/$RELEASE*.yml | sed 's/.*\/.*-\(.*\)\.yml$/\1/' | sort -V | tail -n 1)
7171
echo "type=final" | tee -a >> $GITHUB_OUTPUT
7272
fi
7373
echo "version=${version}" | tee -a $GITHUB_OUTPUT

0 commit comments

Comments
 (0)