Skip to content

Commit 1e3d9e8

Browse files
Update publish.sh
1 parent 2e9ce13 commit 1e3d9e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/scripts/publish.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ then
88
exit 1;
99
fi;
1010

11-
MAJOR=$(cat $VERSION_FILE | grep Major | grep -Eo '[0-9]*');
12-
MINOR=$(cat $VERSION_FILE | grep Minor | grep -Eo '[0-9]*');
13-
PATCH=$(cat $VERSION_FILE | grep Patch | grep -Eo '[0-9]*');
14-
1511
LAST_TAG=$(git tag | tail -n 1);
12+
MAJOR=$(echo $LAST_TAG | sed -E 's/v([0-9]+)\..*/\1/');
13+
MINOR=$(echo $LAST_TAG | sed -E 's/v[0-9]+\.([0-9]+)\..*/\1/');
14+
PATCH=$(echo $LAST_TAG | sed -E 's/v[0-9]+\.[0-9]+\.([0-9]+)-rc/\1/');
1615
RC=0;
16+
1717
if [ "$RELEASE_CANDIDATE" = true ]
1818
then
1919
RC=$(git tag | grep "v$MAJOR.$MINOR.$PATCH-rc" | wc -l | xargs || true);

0 commit comments

Comments
 (0)