Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille authored Jun 28, 2024
1 parent 4be7e18 commit bc3a66b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ jobs:
run: |
maven_config="$(cat .mvn/maven.config)"
current_version="${maven_config/#*-Drevision=}"
current_version=2024.06.001-alpha
current_version="${current_version/ */}"
maven_config="$(cat .mvn/maven.config)"
current_version="${maven_config/#*-Drevision=}"
current_version="${current_version/ */}"
next_version="${current_version/-SNAPSHOT/}"
current_segment="${current_version/*./}"
last_digits="${current_segment/[^0-9]*/}"
suffix="${current_segment/${last_digit}/}"
(( next_segment=${last_digits}+1 ))
while [ ${#next_segment} -ne 3 ]; do next_segment="0${next_segment}"; done
next_version="${current_version%.*}.${next_segment}${suffix}-SNAPSHOT"
sed -i "s/${current_version}/${next_version}/" .mvn/maven.config
git config --global user.email ${{ secrets.BUILD_USER_EMAIL }}
git config --global user.name ${{ secrets.BUILD_USER }}
Expand Down

0 comments on commit bc3a66b

Please sign in to comment.