You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by jf...@apache.org on 2015/05/04 04:51:26 UTC
aurora git commit: Aurora-1302: Allow rc script to set an explicit
version
Repository: aurora
Updated Branches:
refs/heads/master 35c511ee6 -> ece9b35f9
Aurora-1302: Allow rc script to set an explicit version
Adds ability to override current .auroraversion when making an release candidate.
Bugs closed: Aurora-1302
Reviewed at https://reviews.apache.org/r/33773/
Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/ece9b35f
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/ece9b35f
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/ece9b35f
Branch: refs/heads/master
Commit: ece9b35f94ca85482213d3742795200b760ebf03
Parents: 35c511e
Author: Jake Farrell <jf...@apache.org>
Authored: Sun May 3 22:50:56 2015 -0400
Committer: jfarrell <jf...@apache.org>
Committed: Sun May 3 22:50:56 2015 -0400
----------------------------------------------------------------------
build-support/release/release-candidate | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/aurora/blob/ece9b35f/build-support/release/release-candidate
----------------------------------------------------------------------
diff --git a/build-support/release/release-candidate b/build-support/release/release-candidate
index 14dbedd..36f6f4c 100755
--- a/build-support/release/release-candidate
+++ b/build-support/release/release-candidate
@@ -27,6 +27,7 @@ set -o errexit
set -o nounset
rc_tag_version=0
+override_version=''
aurora_git_web_url='https://git-wip-us.apache.org/repos/asf?p=aurora.git'
aurora_svn_dist_url='https://dist.apache.org/repos/dist/dev/aurora'
aurora_version_file='./src/main/resources/apache/aurora/client/cli/.auroraversion'
@@ -37,13 +38,14 @@ Apache Aurora release candidate tool.
Usage: $0 [-h] [-l p|m|M] [-r #] [-p | publish]
- -h Print this help message and exit
- -l Increment level, must be one of:
- p, patch (default)
- m, minor
- M, major
- -r Release candidate number (default: 0)
- -p Publish the release candidate (default: dry-run, does not publish anything)
+ -h Print this help message and exit
+ -l Increment level, must be one of:
+ p, patch (default)
+ m, minor
+ M, major
+ -v Override the existing version in .auroraversion
+ -r Release candidate number (default: 0)
+ -p Publish the release candidate (default: dry-run, does not publish anything)
EOF
exit 0
}
@@ -51,7 +53,7 @@ exit 0
publish=0
increment_level="patch"
rc_tag_version=0
-while getopts ":hl:r:p" opt; do
+while getopts ":hl:v:r:p" opt; do
case $opt in
l)
case ${OPTARG} in
@@ -70,6 +72,9 @@ while getopts ":hl:r:p" opt; do
h)
print_help_and_exit
;;
+ v)
+ override_version=${OPTARG}
+ ;;
* )
echo "Unknown option: -$OPTARG"
print_help_and_exit
@@ -109,6 +114,10 @@ if ! [[ $current_version =~ .*-SNAPSHOT ]]; then
echo "ERROR: .auroraversion is required to contain 'SNAPSHOT', it is ${current_version}"
exit 1
else
+ if [[ $override_version != "" ]]; then
+ current_version=$override_version
+ fi
+
major=`echo $current_version | cut -d. -f1`
minor=`echo $current_version | cut -d. -f2`
patch=`echo $current_version | cut -d. -f3 | cut -d- -f1`