Bug 560306 - [JIRO] Tag is not getting created if there are no changes in the submodules

Change-Id: I9d999c45031011e251c80037f317afaf03039d88
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
diff --git a/cje-production/mbscripts/mb110_tagBuildInputs.sh b/cje-production/mbscripts/mb110_tagBuildInputs.sh
index db6de9c..5d00006 100755
--- a/cje-production/mbscripts/mb110_tagBuildInputs.sh
+++ b/cje-production/mbscripts/mb110_tagBuildInputs.sh
@@ -13,7 +13,6 @@
 # Contributors:
 #     Kit Lo - initial API and implementation
 #*******************************************************************************
-set -e
 
 if [ $# -ne 1 ]; then
   echo USAGE: $0 env_file
@@ -35,7 +34,10 @@
 
 # git tagging
 git commit -m "Build input for build $BUILD_ID"
-git push origin HEAD
+if [[ $? -eq 0 ]]
+then
+	git push origin HEAD
+fi
 
 git submodule foreach "if grep \"^\${name}:\" ../../../streams/repositories_$PATCH_OR_BRANCH_LABEL.txt > /dev/null; then git tag $BUILD_ID; git push --verbose origin $BUILD_ID; else echo Skipping \$name; fi || :"
 #git submodule foreach "if grep \"^\${name}:\" ../../../streams/repositories_$PATCH_OR_BRANCH_LABEL.txt > /dev/null; then git tag $BUILD_ID;  else echo Skipping \$name; fi || :"