From 0c2fcbd012e8b45e2ef4e5fd2ea1f799e53ae788 Mon Sep 17 00:00:00 2001 From: kinoshita-eos Date: Tue, 19 Aug 2014 15:45:02 +0900 Subject: [PATCH] Ticket 34171 Add message at make git-push in Makefile. --- Makefile | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8e51e401fd..aed6a79de7 100644 --- a/Makefile +++ b/Makefile @@ -135,19 +135,54 @@ git-backup:: git-push-all:: git-push git-push-data git-push-optional git-push-tutorial git-push-others git-push:: - git push origin master --tags +# git push origin master --tags + @export DIRECTORYNAME=./; \ + export ORIGINNAME=origin; \ + make git-push-with-check; git-push-optional:: - cd optional; git push optional master --tags +# cd optional; git push optional master --tags + @export DIRECTORYNAME=optional; \ + export ORIGINNAME=optional; \ + make git-push-with-check; git-push-data:: - cd data; git push data master --tags +# cd data; git push data master --tags + @export DIRECTORYNAME=data; \ + export ORIGINNAME=data; \ + make git-push-with-check; git-push-tutorial:: - cd tutorial; git push tutorial master --tags +# cd tutorial; git push tutorial master --tags + @export DIRECTORYNAME=tutorial; \ + export ORIGINNAME=tutorial; \ + make git-push-with-check; git-push-others:: - cd others; git push others master --tags +# cd others; git push others master --tags + @export DIRECTORYNAME=others; \ + export ORIGINNAME=others; \ + make git-push-with-check; + +git-push-with-check:: + @if [ ! -z "$$DIRECTORYNAME" -a ! -z "$$ORIGINNAME" ]; then \ + cd $$DIRECTORYNAME; \ + echo; \ + SSS=`git tag | tail -1`; \ + if [ ! -z "$$SSS" ]; then \ + echo "$$SSS is Current Tag in $$ORIGINNAME."; \ + echo "Did Tag update? Y(: push) | N(or Otherwords : not push)"; \ + read TTT; \ + if [ "$$TTT" = Y ]; then \ + git push $$ORIGINNAME master --tags; \ + else \ + echo "not push."; \ + fi; \ + else \ + echo "Tags do not exist in $$ORIGINNAME."; \ + echo "Before push please add tag at current repositry."; \ + fi; \ + fi; git-fetch-all:: git-fetch git-fetch-data git-fetch-optional git-fetch-tutorial git-fetch-others -- 2.11.0