Skip to content

Commit

Permalink
🐛 Fix quarterly patch version (#216)
Browse files Browse the repository at this point in the history
* 🐛 Fix quarterly patch version

* 🚨 Make linter happy
  • Loading branch information
flaxel authored Jan 24, 2024
1 parent 8ce6de6 commit 7c2d731
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/template_release_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ jobs:
OLD_VERSION=`gh api repos/${{ github.repository }}/releases/latest | jq .tag_name -r`
PARTS=(${OLD_VERSION//./ })
COUNTER=${PARTS[2]}
WEEK_FROM_LAST_TAG=${PARTS[1]}
MINOR_FROM_LAST_TAG=${PARTS[1]}
# if we have a new week we start to count from 0
if [ ${WEEK_FROM_LAST_TAG} != ${WEEK} ]; then
# if we have a new week and the weekly release we start to count from 0
if [ ${MINOR_FROM_LAST_TAG} != ${WEEK} ] && [ ${{ inputs.format }} == 'weekly' ]; then
COUNTER=0
fi
# if we have a new quarter and the quarterly release we start to count from 0
if [ ${MINOR_FROM_LAST_TAG} != ${QUARTER} ] && [ ${{ inputs.format }} == 'quarterly' ]; then
COUNTER=0
fi
Expand Down

0 comments on commit 7c2d731

Please sign in to comment.