From 879f61d379775810d4887f2458e4bbda101d7ab2 Mon Sep 17 00:00:00 2001 From: "Ryan S. Arnold" Date: Mon, 20 Jul 2015 19:14:58 -0500 Subject: Add hint() to output information on what should be pushed to the remotes 1) local_int_branch -> remote_int_branch 2) local_mode_branch -> remote_mode_branch 3) tag -> remote tag Change-Id: I36847b7f0e27a75c6583a94fc5b3261c9aae0c5c --- tcwg-release.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'tcwg-release.sh') diff --git a/tcwg-release.sh b/tcwg-release.sh index aa136d8..d6e9002 100755 --- a/tcwg-release.sh +++ b/tcwg-release.sh @@ -6,6 +6,7 @@ red='\e[0;31m' blue='\e[1;34m' green='\e[0;32m' bold='\e[1m' +italic='\e[3m' lines="$(perl -E 'say "-" x 80')" EDITOR="${EDITOR:-vim}" # ============================================================================== @@ -386,6 +387,29 @@ tag() { fi } +hint() { + url=$(git config --get remote.${REMOTE}.url) + if [ x"${url}" = x ]; then + print_info "Couldn't determine viable url from remote \"${REMOTE}\"" + fi + + print_info "${bold}Push local tag ${red}${release_tag}${NC}${bold} to remote \"${REMOTE}\" with:" + print_info " git push ${url/https:\/\//ssh://git@} ${release_tag}" + print_info "${bold}local branch ${red}${local_branch}${NC}${bold} to remote \"${REMOTE}\" with:" + print_info " git push ${url/https:\/\//ssh://git@} ${local_branch}:${remote_branch/remotes\/${REMOTE}/refs/heads}" + + if [ "${SNAPSHOT:+set}" = "set" ]; then + print_info "${bold}local integration branch ${red}${local_int_branch}${NC}${bold} to remote \"${REMOTE}\" with:" + print_info " git push ${url/https:\/\//ssh://git@} ${local_int_branch}:${remote_int_branch/remotes\/${REMOTE}/refs/heads}" + print_info "" + print_info "${italic}${bold}Note: ${NC}${italic}Someone with FSF write permission will need to cherry-pick the remote_int_branch changes into" + print_info " refs/heads/fsf/linaro/gcc-${vstring%.*}-branch." + fi + print_info "" + print_info "${bold}The ${SNAPSHOT:+snapshot}${RELEASE:+release}${CANDIDATE:+release candidate} tarball is in:" + print_info " ${REL_DIR}/gcc-linaro-${rname}.tar.xz" +} + # ============================================================================== # Settings # ============================================================================== @@ -710,3 +734,5 @@ popd 1>/dev/null if [ "${SNAPSHOT:+set}" = "set" ]; then bump_and_dev "${bump_snapshot_to}" fi + +hint -- cgit v1.2.3