File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -e
3
3
4
- # This script assumes that release X.Y.Z will always be created from X.Y.Z-SNAPSHOT"
5
- echo " Replace snapshot version with release version ${RELEASE_VERSION} in build.gradle"
6
- sed --in-place " s/version = '.*-SNAPSHOT'/version = '${RELEASE_VERSION} '/g" build.gradle
4
+ if [ " $# " -ne 3 ]; then
5
+ echo " Usage: $0 <current version> <release version> <next version>" >&2
6
+ exit 1
7
+ fi
7
8
8
- echo " Create package commit for ${RELEASE_VERSION} "
9
- git commit -m " Version: bump ${RELEASE_VERSION} " build.gradle
9
+ SCRIPT_DIR=$( dirname ${BASH_SOURCE[0]} )
10
+
11
+ echo " Bump version in build.gradle to ${RELEASE_VERSION} "
12
+ ${SCRIPT_DIR} /bump-version.sh " ${RELEASE_VERSION_WITHOUT_SUFFIX} -SNAPSHOT" " ${RELEASE_VERSION} "
10
13
11
14
echo " Create release tag for ${RELEASE_VERSION} "
12
15
git tag -a -m " ${RELEASE_VERSION} " r${RELEASE_VERSION}
13
16
14
17
echo " Bump to snapshot version for ${NEXT_VERSION} "
15
- sed --in-place " s/version = '${RELEASE_VERSION} '/version = '${NEXT_VERSION} -SNAPSHOT'/g" build.gradle
16
-
17
- echo " Create commit for version bump to ${NEXT_VERSION} "
18
- git commit -m " Version: bump ${NEXT_VERSION} -SNAPSHOT" build.gradle
18
+ ${SCRIPT_DIR} /bump-version.sh " ${RELEASE_VERSION} " " ${NEXT_VERSION} -SNAPSHOT"
You can’t perform that action at this time.
0 commit comments