Skip to content

Commit

Permalink
test release 5
Browse files Browse the repository at this point in the history
  • Loading branch information
ZEXSM committed Oct 28, 2023
1 parent 2a165a6 commit d9aa128
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ jobs:
git fetch --tags --force &> /dev/null
PR_TITLE=$(git log -1 --pretty='%f')
LAST_TAG=$(echo $(git describe --tags $(git rev-list --tags --max-count=1)) | cut -d'v' -f 2)
echo $LAST_TAG
CURRENT_MAJOR=$(echo $LAST_TAG | cut -d. -f 1)
CURRENT_MINOR=$(echo $LAST_TAG | cut -d. -f 2)
CURRENT_PATCH=$(echo $(echo $LAST_TAG | cut -d. -f 3) | cut -d- -f 1)
RC=$(echo $(echo $LAST_TAG | cut -d. -f 3) | cut -d- -f 2)
echo $CURRENT_MAJOR $CURRENT_MINOR $CURRENT_PATCH $RC
MAJOR=$(([ "$RC" == "rc" ] && echo $CURRENT_MAJOR) || ([ "$(echo $PR_TITLE | grep -oP 'release')" == "release" ] && echo $(($CURRENT_MAJOR+1))) || echo $CURRENT_MAJOR)
MINOR=$(([ "$RC" == "rc" ] && echo $CURRENT_MINOR) || ([ "$(echo $PR_TITLE | grep -oP 'release')" == "release" ] && echo 0) || ([ "$(echo $PR_TITLE | grep -oP 'feature')" == "feature" ] && echo $(($CURRENT_MINOR+1))) || echo $CURRENT_MINOR)
PATCH=$(([ "$RC" == "rc" ] && echo $CURRENT_PATCH) || ([ "$(echo $PR_TITLE | grep -oP 'release')" == "release" ] && echo 0) || ([ "$(echo $PR_TITLE | grep -oP 'feature')" == "feature" ] && echo 0) || echo $(($CURRENT_PATCH+1)))
NEW_TAG=$(echo $MAJOR.$MINOR.$PATCH)
echo $MAJOR $MINOR $PATCH
PACKAGE_VERSION=${NEW_TAG:-${{ vars.DEFAULT_PACKAGE_VERSION }}}
echo "release_package_version=$PACKAGE_VERSION" >> "$GITHUB_OUTPUT"
echo $PACKAGE_VERSION
Expand Down

0 comments on commit d9aa128

Please sign in to comment.