File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Expects the following environment variables to be set:
4+ # $NEW_VERSION (Example: "1.2.0")
5+ # This will fail the Maven build if the version is not available.
6+ # Thankfully, this is not the case (yet) in this project.
7+ # If/when it happens, this needs to be replaced by a manually provided version,
8+ # as scanning the text of the POM would be unreliable.
9+ echo " New version: $NEW_VERSION "
10+ ./mvnw versions:set -Dfull -Dproperty=revision -DnewVersion=$NEW_VERSION -Drevision=$NEW_VERSION -DgenerateBackupPoms=false
11+ # replaces the parent revision which is is not updated by the previous command
12+ sed -i " 0,/<\/revision>/s/<revision>.*<\/revision>/<revision>$NEW_VERSION <\/revision>/" pom.xml
13+ sed -i " 0,/<\/revision>/s/<revision>.*<\/revision>/<revision>$NEW_VERSION <\/revision>/" model/facade/model-parent/pom.xml
14+ git add -u
Original file line number Diff line number Diff line change @@ -24,14 +24,17 @@ jobs:
2424 git config user.name "Timefold Release Bot"
2525 git config user.email "release@timefold.ai"
2626 git checkout $RELEASE_BRANCH_NAME
27- ./mvnw -Dfull versions:set -DnewVersion=999-SNAPSHOT
27+ export NEW_VERSION="999-SNAPSHOT"
28+ .github/scripts/change_versions.sh
2829 git commit -am "build: move back to 999-SNAPSHOT"
2930 git push origin $RELEASE_BRANCH_NAME
3031
3132 - name : Update release branch
3233 shell : bash
34+ env :
35+ TAG_REF : ${{ github.ref }}
3336 run : |
34- tag=${{ github.ref }}
37+ tag="$TAG_REF"
3538 tag_version=${tag##*/}
3639 version=${tag_version%.*}
3740 version="${version:1}.x"
5154 git branch -m $RELEASE_BRANCH_NAME $version
5255 git push origin -u $version
5356 git push -d origin $RELEASE_BRANCH_NAME
54- fi
57+ fi
You can’t perform that action at this time.
0 commit comments