Skip to content

Commit

Permalink
deploy non snapshot-version
Browse files Browse the repository at this point in the history
  • Loading branch information
liquidsunset committed Nov 11, 2024
1 parent 5ab8f51 commit 90e5d00
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/release-and-deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,17 @@ jobs:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
nexus_username: ${{ secrets.OSSRH_USER }}
nexus_password: ${{ secrets.OSSRH_PASSWORD }}
nexus_password: ${{ secrets.OSSRH_PASSWORD }}
# Install xmllint
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libxml2-utils
# Set git user name and email
- name: Set up Git
run: |
chmod +x ci/setup-git.sh
ci/setup-git.sh
# Set the next SNAPSHOT version
- name: Release (versioning/tag)
run: |
chmod +x ci/mvn-post-release.sh
ci/mvn-post-release.sh
15 changes: 15 additions & 0 deletions ci/mvn-post-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

CURRENT_VERSION=`xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' pom.xml`

if [[ $CURRENT_VERSION != *-SNAPSHOT ]]; then
NEXT_VERSION=`bash ci/semver.sh -p CURRENT_VERSION`
NEXT_SNAPSHOT="$NEXT_VERSION-SNAPSHOT"

mvn versions:set -DnewVersion=$NEXT_SNAPSHOT versions:commit --no-transfer-progress

echo "commit new snapshot version"
git commit -a -m "Release $NEW_VERSION: set 6.2 to next development version $NEXT_SNAPSHOT"

git push --all
fi
5 changes: 0 additions & 5 deletions ci/mvn-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ if [[ $CURRENT_VERSION == *-SNAPSHOT ]]; then
echo "create tag for new release"
git tag -a $NEW_VERSION -m "Release $NEW_VERSION: tag release"

mvn versions:set -DnewVersion=$NEXT_SNAPSHOT versions:commit --no-transfer-progress

echo "commit new snapshot version"
git commit -a -m "Release $NEW_VERSION: set 6.2 to next development version $NEXT_SNAPSHOT"

git push --all
git push --tags
fi

0 comments on commit 90e5d00

Please sign in to comment.