diff options
| author | Tobias Bosch | 2014-01-06 14:01:39 -0800 |
|---|---|---|
| committer | Tobias Bosch | 2014-01-06 14:11:44 -0800 |
| commit | dc89db33df8a0515fba0f25d3cdf82fa994f3a4b (patch) | |
| tree | 94a6f7fbdf3235569f3f396e25631801c33607ad /scripts/utils.inc | |
| parent | 5dc27959d5c0e45cc0cc6133a9ef676cc15d44bd (diff) | |
| download | angular.js-dc89db33df8a0515fba0f25d3cdf82fa994f3a4b.tar.bz2 | |
chore(build): bugfixes to build scripts on Jenkins.
Diffstat (limited to 'scripts/utils.inc')
| -rw-r--r-- | scripts/utils.inc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/utils.inc b/scripts/utils.inc index 0465de8f..3b0039ed 100644 --- a/scripts/utils.inc +++ b/scripts/utils.inc @@ -217,8 +217,8 @@ function git_push_dryrun_proxy { export ORIGIN_GIT=$(which git) function git { - local var - ARGS=("$@") + local ARGS=("$@") + local RC if [[ $1 == "push" ]]; then ARGS+=("--dry-run" "--porcelain") echo "####### START GIT PUSH DRYRUN #######" @@ -228,9 +228,11 @@ function git_push_dryrun_proxy { echo "${ARGS[@]}" fi $ORIGIN_GIT "${ARGS[@]}" + RC=$? if [[ $1 == "push" ]]; then echo "####### END GIT PUSH DRYRUN #######" fi + return $RC } export -f git @@ -240,11 +242,11 @@ function main { # normalize the working dir to the directory of the script cd $(dirname $0);SCRIPT_DIR=$(pwd) - ARG_DEFS+=("[--git-push-dryrun=true]" "[--verbose=true]") + ARG_DEFS+=("[--git-push-dryrun=(true|false)]" "[--verbose=(true|false)]") parseArgs "$@" # --git_push_dryrun argument - if [[ $GIT_PUSH_DRYRUN ]]; then + if [[ $GIT_PUSH_DRYRUN == "true" ]]; then git_push_dryrun_proxy fi @@ -252,7 +254,7 @@ function main { set -e # --verbose argument - if [[ $VERBOSE ]]; then + if [[ $VERBOSE == "true" ]]; then set -x fi |
