Skip to content

Commit 5eda777

Browse files
authored
fix: handle version prefix in tools version increment script [TOOLS][MAJOR] (#1616)
1 parent a94b854 commit 5eda777

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/otomi-tools-build-push.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
5454
if git log --format=%B -n 1 ${{ github.sha }} | grep -q "\[TOOLS\]\[MAJOR\]"; then
5555
# If a "[TOOLS][MAJOR]" commit is found, increment the major version by one and reset the minor and patch version to '0'.
56-
NEW_VERSION="$(echo ${OLD_VERSION} | awk -F. -v OFS=. '{$1 = $1 + 1; $2 = 0; $3 = 0} {print $0}')"
56+
NEW_VERSION="$(echo ${OLD_VERSION} | sed 's/^v//' | awk -F. -v OFS=. '{$1 = $1 + 1; $2 = 0; $3 = 0} {print "v"$0}')"
5757
echo "NEW_VERSION=${NEW_VERSION}" >> $GITHUB_ENV
5858
echo OLD_VERSION = ${OLD_VERSION}
5959
echo NEW_VERSION = ${NEW_VERSION}

0 commit comments

Comments
 (0)