Repository: incubator-ignite Updated Branches: refs/heads/gg-9869 380a53da5 -> 03f890ad9
# gg-9869: add determineCurrentBranch function Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/13dc5a17 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/13dc5a17 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/13dc5a17 Branch: refs/heads/gg-9869 Commit: 13dc5a173955d40e8b7b7aa356bc2f6d8e0b5832 Parents: 380a53d Author: Artem Shutak <[email protected]> Authored: Wed Mar 4 13:26:27 2015 +0300 Committer: Artem Shutak <[email protected]> Committed: Wed Mar 4 13:26:27 2015 +0300 ---------------------------------------------------------------------- scripts/git-format-patch.sh | 6 +++++- scripts/git-patch-functions.sh | 10 ++++++++++ scripts/git-patch-prop.sh | 7 +------ 3 files changed, 16 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13dc5a17/scripts/git-format-patch.sh ---------------------------------------------------------------------- diff --git a/scripts/git-format-patch.sh b/scripts/git-format-patch.sh index 7df08dc..67e5c0f 100644 --- a/scripts/git-format-patch.sh +++ b/scripts/git-format-patch.sh @@ -34,13 +34,17 @@ if [ -f ${IGNITE_HOME}/scripts/git-patch-prop-local.sh ] # Whether a local user then . ${IGNITE_HOME}/scripts/git-patch-prop-local.sh # Import user properties (it will rewrite global properties). fi +determineCurrentBranch ${IGNITE_HOME} + echo 'Usage: scripts/git-format-patch.sh.' echo "It should be called from IGNITE_HOME directory." echo "Patch will be created at PATCHES_HOME between Master branch (IGNITE_DEFAULT_BRANCH) and Current branch. " echo +echo "IGNITE_HOME: ${IGNITE_HOME}" echo "PATCHES_HOME: ${PATCHES_HOME}" echo "Master branch: ${IGNITE_DEFAULT_BRANCH}" -echo "Current branch: ${PATCHED_BRANCH}" +echo "Current branch: ${CURRENT_BRANCH}" +echo # # Main script logic. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13dc5a17/scripts/git-patch-functions.sh ---------------------------------------------------------------------- diff --git a/scripts/git-patch-functions.sh b/scripts/git-patch-functions.sh index 971db16..633553b 100644 --- a/scripts/git-patch-functions.sh +++ b/scripts/git-patch-functions.sh @@ -104,3 +104,13 @@ exitIfBranchDoesNotExist () { exit fi } + +CURRENT_BRANCH="" + +determineCurrentBranch () { + GIT_HOME=$1 + + cd ${GIT_HOME} + + CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD` +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/13dc5a17/scripts/git-patch-prop.sh ---------------------------------------------------------------------- diff --git a/scripts/git-patch-prop.sh b/scripts/git-patch-prop.sh index 03bd534..9ba8e35 100644 --- a/scripts/git-patch-prop.sh +++ b/scripts/git-patch-prop.sh @@ -21,10 +21,5 @@ # IGNITE_DEFAULT_BRANCH='sprint-2' -GG_DEFAULT_BRANCH='ignite-sprint-2' -if [ "${IGNITE_HOME}" = "" ]; - then IGNITE_HOME=${GG_HOME}/../incubator-ignite -fi - -PATCHES_HOME=${GG_HOME} \ No newline at end of file +PATCHES_HOME=${IGNITE_HOME} \ No newline at end of file
