Skip to content

Commit

Permalink
build: perform a release on a dedicated branch
Browse files Browse the repository at this point in the history
The branch is to be eventually merged.
It should be pushed upstream by whoever does the release before calling
`just perform-release`.
  • Loading branch information
jponge committed Nov 20, 2024
1 parent 4bda265 commit 8215027
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ prepare-release previousVersion version:
./mvnw --batch-mode --no-transfer-progress -Pupdate-workshop-examples -f workshop-examples compile -DworkshopVersion={{version}}
find workshop-examples -name '*.java' | xargs chmod +x
git commit -am "chore(release): update version metadata for Mutiny {{version}}"
@echo "✅ All set, please review the changes on this branch before doing the release"
@echo "✅ All set, please review the changes on this branch before doing the release, then:"
@echo " - git push origin release/{{version}} --set-upstream"
@echo " - just perform-release"

# Perform a release
perform-release:
Expand All @@ -32,23 +34,17 @@ perform-release:
export JRELEASER_GITHUB_TOKEN=$(gh auth token)
export JRELEASER_PROJECT_VERSION=${RELEASE_VERSION}
export JRELEASER_PREVIOUS_TAG_NAME=${PREVIOUS_VERSION}
./mvnw --batch-mode --no-transfer-progress -Djreleaser.dry.run -Pjreleaser jreleaser:full-release -pl :mutiny-project
# Post-release steps
post-release:
#!/usr/bin/env bash
echo "🚀 Post-release "
export RELEASE_VERSION=$(yq '.release.current-version' .github/project.yml)
export NEXT_VERSION=$(yq '.release.next-version' .github/project.yml)
echo "✅ JReleaser ok, preparing post-release commits"
./mvnw --batch-mode --no-transfer-progress -Pjreleaser jreleaser:full-release -pl :mutiny-project
./mvnw --batch-mode --no-transfer-progress versions:set -DnewVersion=${NEXT_VERSION} -DgenerateBackupPoms=false
./mvnw --batch-mode --no-transfer-progress versions:set -DnewVersion=${NEXT_VERSION} -DgenerateBackupPoms=false -pl bom
git commit -am "chore(release): set development version to ${NEXT_VERSION}"
just clear-revapi
echo "✅ All set, don't forget to merge this branch and push the changes upstream"
echo "✅ All set, don't forget to merge this branch and push upstream."
echo "💡 If you released from main:"
echo " git switch main"
echo " git merge release/${RELEASE_VERSION}"
echo " git push"
echo " git push --tags"
# Clear RevAPI justifications
clear-revapi:
Expand Down

0 comments on commit 8215027

Please sign in to comment.