Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
The correct versioning for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
helto4real committed Jan 18, 2022
1 parent 96390b4 commit 92b7136
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,13 @@ jobs:
- name: ⏭️ Get next version
id: version
run: |
declare -i newpost
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
latestpre=$(echo "$latest" | awk '{split($0,a,"."); print a[1] "." a[2]}')
datepre=$(date --utc '+%y.%-W')
if [[ "$latestpre" == "$datepre" ]]; then
latestpost=$(echo "$latest" | awk '{split($0,a,"."); print a[3]}')
newpost=$latestpost+1
else
newpost=0
fi
echo Current version: $latest
echo New target version: $datepre.$newpost
echo "::set-output name=version::$datepre.$newpost"
declare -i newpost
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
latestpost=$(echo "$latest" | awk '{split($0,a,"."); print a[3]}')
newpost=$latestpost+1
echo Current version: $latest
echo New target version: 22.1.$newpost
echo "::set-output name=version::22.1.$newpost"
- name: 🏃 Run Release Drafter
uses: release-drafter/release-drafter@v5
Expand Down

0 comments on commit 92b7136

Please sign in to comment.