Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/scripts/change_versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Expects the following environment variables to be set:
# $NEW_VERSION (Example: "1.2.0")
# This will fail the Maven build if the version is not available.
# Thankfully, this is not the case (yet) in this project.
# If/when it happens, this needs to be replaced by a manually provided version,
# as scanning the text of the POM would be unreliable.
echo " New version: $NEW_VERSION"
Comment thread
zepfred marked this conversation as resolved.
./mvnw versions:set -Dfull -Dproperty=revision -DnewVersion="$NEW_VERSION" -Drevision="$NEW_VERSION" -DgenerateBackupPoms=false
# replaces the parent revision which is not updated by the previous command
sed -i "0,/<\/revision>/s/<revision>.*<\/revision>/<revision>$NEW_VERSION<\/revision>/" pom.xml
sed -i "0,/<\/revision>/s/<revision>.*<\/revision>/<revision>$NEW_VERSION<\/revision>/" model/facade/model-parent/pom.xml
git add -u
9 changes: 6 additions & 3 deletions .github/workflows/finish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,17 @@ jobs:
git config user.name "Timefold Release Bot"
git config user.email "release@timefold.ai"
git checkout $RELEASE_BRANCH_NAME
./mvnw -Dfull versions:set -DnewVersion=999-SNAPSHOT
export NEW_VERSION="999-SNAPSHOT"
.github/scripts/change_versions.sh
git commit -am "build: move back to 999-SNAPSHOT"
git push origin $RELEASE_BRANCH_NAME

- name: Update release branch
shell: bash
env:
TAG_REF: ${{ github.ref }}
run: |
tag=${{ github.ref }}
tag="$TAG_REF"
tag_version=${tag##*/}
version=${tag_version%.*}
version="${version:1}.x"
Expand All @@ -51,4 +54,4 @@ jobs:
git branch -m $RELEASE_BRANCH_NAME $version
git push origin -u $version
git push -d origin $RELEASE_BRANCH_NAME
fi
fi
107 changes: 0 additions & 107 deletions .github/workflows/release.yml

This file was deleted.

52 changes: 0 additions & 52 deletions jreleaser.yml

This file was deleted.

Loading