From 7f614f4dfeaa31dd0d5c76b80aa3d3b4aa0f6ac9 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 9 Sep 2014 17:58:57 -0700 Subject: [PATCH] gitify - Add options "--branch" and "--skip-gencode" --- bin/gitify | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/bin/gitify b/bin/gitify index 90c4b6018e..9b8a889308 100755 --- a/bin/gitify +++ b/bin/gitify @@ -150,6 +150,7 @@ CIVICRM_GIT_HOOKS="" CIVICRM_BRANCH="master" FORK_GIT_BASE_URL="" UPSTREAM_GIT_BASE_URL="https://github.com/civicrm" +SKIP_GENCODE= while [ -n "$1" ]; do if [ "$1" == "--l10n" ]; then @@ -162,6 +163,11 @@ while [ -n "$1" ]; do elif [ "$1" == "--fork" ]; then shift FORK_GIT_BASE_URL="$1" + elif [ "$1" == "--skip-gencode" ]; then + SKIP_GENCODE=1 + elif [ "$1" == "--branch" ]; then + shift + CIVICRM_BRANCH="$1" elif [ -z "$CIVICRM_CMS" ]; then ## First arg CIVICRM_CMS="$1" @@ -177,7 +183,7 @@ done if [ -z "$CIVICRM_ROOT" -o ! -d "$CIVICRM_ROOT" -o -z "$UPSTREAM_GIT_BASE_URL" -o -z "$CIVICRM_CMS" ]; then echo "Convert a directory into a set of CiviCRM git clones" - echo "usage: $0 [--fork ] [--upstream ] [--l10n] [--hooks]" + echo "usage: $0 [--fork ] [--upstream ] [--l10n] [--hooks] [--branch ]" echo " : one of: Drupal|Drupal6|Joomla|WordPress|all" echo " : a base URL shared by the desiried git repos (e.g. git://github.com/civicrm)" echo " : the main directory containing CiviCRM" @@ -187,6 +193,9 @@ if [ -z "$CIVICRM_ROOT" -o ! -d "$CIVICRM_ROOT" -o -z "$UPSTREAM_GIT_BASE_URL" - echo " --hooks: optionally install recommended git hooks; the hooks are mostly" echo " tested with git CLI under Linux and OSX; they haven't been" echo " tested with git GUIs or Windows" + echo " --branch : specy the base branch name to checkout (ex: 'master', '4.4')" + echo " For some repos, this name is adapted (ex: Drupal's '7.x-master' or '6.x-master'" + echo " --skip-gencode: optionally disable gencode execution" echo "" echo "Note: If pointing to a pre-existing directory, your local changes may be replaced by" echo "the pristine code from git. If you've made changes, then make sure there's a backup!" @@ -235,4 +244,6 @@ if [ "$CIVICRM_L10N" == "--l10n" ]; then do_targzify "https://download.civicrm.org/civicrm-l10n-core/archives/civicrm-l10n-daily.tar.gz" "civicrm-l10n-daily.tar.gz" "$CIVICRM_ROOT/l10n" fi -do_gencode "$CIVICRM_ROOT" +if [ -z "$SKIP_GENCODE" ]; then + do_gencode "$CIVICRM_ROOT" +fi -- 2.25.1