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

Commit 92b7136

Browse files
committed
The correct versioning for v2
1 parent 96390b4 commit 92b7136

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

.github/workflows/release_drafter.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,13 @@ jobs:
1818
- name: ⏭️ Get next version
1919
id: version
2020
run: |
21-
declare -i newpost
22-
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
23-
latestpre=$(echo "$latest" | awk '{split($0,a,"."); print a[1] "." a[2]}')
24-
datepre=$(date --utc '+%y.%-W')
25-
if [[ "$latestpre" == "$datepre" ]]; then
26-
latestpost=$(echo "$latest" | awk '{split($0,a,"."); print a[3]}')
27-
newpost=$latestpost+1
28-
else
29-
newpost=0
30-
fi
31-
echo Current version: $latest
32-
echo New target version: $datepre.$newpost
33-
echo "::set-output name=version::$datepre.$newpost"
21+
declare -i newpost
22+
latest=$(git describe --tags $(git rev-list --tags --max-count=1))
23+
latestpost=$(echo "$latest" | awk '{split($0,a,"."); print a[3]}')
24+
newpost=$latestpost+1
25+
echo Current version: $latest
26+
echo New target version: 22.1.$newpost
27+
echo "::set-output name=version::22.1.$newpost"
3428
3529
- name: 🏃 Run Release Drafter
3630
uses: release-drafter/release-drafter@v5

0 commit comments

Comments
 (0)