From 59a39a3b173e7931b23cadee80279dfb4bc555d2 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 15 Mar 2013 15:38:23 -0400 Subject: [PATCH] releaser - Optionally split the "build" and "publish" steps This allows one to test the tarballs produced by distmaker before publishing anything. --- tools/scripts/releaser/releaser | 48 +++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/tools/scripts/releaser/releaser b/tools/scripts/releaser/releaser index b4406993ec..09eaacd6e6 100755 --- a/tools/scripts/releaser/releaser +++ b/tools/scripts/releaser/releaser @@ -4,6 +4,7 @@ set -e confdir=$(dirname $0) start_point="$1" version="$2" +first_act="$3" distmaker_tgt=all if [ ! -f "$confdir/releaser.conf" ]; then @@ -13,9 +14,14 @@ if [ ! -f "$confdir/releaser.conf" ]; then fi source "$confdir/releaser.conf" -if [ -z "$version" -o -z "$start_point" ]; then +if [ -z "$start_point" -o -z "$version" -o -z "$first_act" ]; then echo - echo "Usage: $0 " + echo "Usage:" + echo " $0 --build" + echo " $0 --publish" + echo " $0 --clean" + echo " $0 --build --publish --clean [[ORDER SIGNIFICANT]]" + echo "Arguments:" echo " is a branch name (e.g. \"master\")" echo " is Civi release (e.g. \"4.3.beta2\"); it will become a tag name" exit 2 @@ -27,8 +33,6 @@ else is_stable= fi -set -ex - ################################################# ## Git setup function do_git_config() { @@ -165,10 +169,32 @@ function do_cleanup() { ## Refactoring note: this used to be one monolithic script -do_git_config -do_mk_project -do_git_tag -do_distmaker -do_git_tag_push -do_publish -do_cleanup +shift ## start point +shift ## version +for ACT in "$@" ; do + case "$ACT" in + --build) + set -ex + do_git_config + do_mk_project + do_git_tag + do_distmaker + set +x + ;; + --publish) + set -ex + do_git_tag_push + do_publish + set +x + ;; + --clean) + set -ex + do_cleanup + set +x + ;; + *) + echo "unrecognized: $ACT" + ;; + esac +done + -- 2.25.1