-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Andreas Braun <[email protected]>
- Loading branch information
Showing
3 changed files
with
82 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# This script assumes that release X.Y.Z will always be created from X.Y.Z-SNAPSHOT" | ||
echo "Replace snapshot version with release version ${RELEASE_VERSION} in build.gradle" | ||
sed --in-place "s/version = '.*-SNAPSHOT'/version = '${RELEASE_VERSION}'/g" build.gradle | ||
if [ "$#" -ne 3 ]; then | ||
echo "Usage: $0 <current version> <release version> <next version>" >&2 | ||
exit 1 | ||
fi | ||
|
||
echo "Create package commit for ${RELEASE_VERSION}" | ||
git commit -m "Version: bump ${RELEASE_VERSION}" build.gradle | ||
CURRENT_VERSION=$1 | ||
RELEASE_VERSION=$2 | ||
NEXT_VERSION=$3 | ||
|
||
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]}) | ||
|
||
echo "Bump version in build.gradle to ${RELEASE_VERSION}" | ||
${SCRIPT_DIR}/bump-version.sh "${RELEASE_VERSION_WITHOUT_SUFFIX}-SNAPSHOT" "${RELEASE_VERSION}" | ||
|
||
echo "Create release tag for ${RELEASE_VERSION}" | ||
git tag -a -m "${RELEASE_VERSION}" r${RELEASE_VERSION} | ||
|
||
echo "Bump to snapshot version for ${NEXT_VERSION}" | ||
sed --in-place "s/version = '${RELEASE_VERSION}'/version = '${NEXT_VERSION}-SNAPSHOT'/g" build.gradle | ||
|
||
echo "Create commit for version bump to ${NEXT_VERSION}" | ||
git commit -m "Version: bump ${NEXT_VERSION}-SNAPSHOT" build.gradle | ||
${SCRIPT_DIR}/bump-version.sh "${RELEASE_VERSION}" "${NEXT_VERSION}-SNAPSHOT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 <old version> <new version>" >&2 | ||
exit 1 | ||
fi | ||
|
||
FROM_VERSION=$1 | ||
TO_VERSION=$2 | ||
|
||
sed --in-place "s/version = '${FROM_VERSION}'/version = '${TO_VERSION}'/g" build.gradle | ||
git commit -m "Version: bump ${TO_VERSION}" build.gradle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters