Browse Source

HPCC-25891 go_gold and go_rc scripts miss some commands in dryrun mode

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 4 years ago
parent
commit
bf1fb3cb75
3 changed files with 12 additions and 6 deletions
  1. 3 3
      cmake_modules/go_gold.sh
  2. 3 3
      cmake_modules/go_rc.sh
  3. 6 0
      cmake_modules/parse_cmake.sh

+ 3 - 3
cmake_modules/go_gold.sh

@@ -72,7 +72,7 @@ if [ -e helm/hpcc/Chart.yaml ] ; then
   # but only copy helm chart sources across for "latest stable" version
 
   HPCC_DIR="$( pwd )"
-  pushd ../helm-chart 2>&1 > /dev/null
+  doit2 "pushd ../helm-chart 2>&1 > /dev/null"
   doit "git fetch $REMOTE"
   doit "git checkout master"
   doit "git merge --ff-only $REMOTE/master"
@@ -85,7 +85,7 @@ if [ -e helm/hpcc/Chart.yaml ] ; then
     doit "rm ./helm/hpcc/*.bak" 
     doit "git add -A ./helm"
   fi
-  cd docs
+  doit2 "cd docs"
   for f in `find ${HPCC_DIR}/helm/examples ${HPCC_DIR}/helm/managed -name Chart.yaml` ; do
     doit "helm package ${f%/*}/ --dependency-update"
   done
@@ -98,5 +98,5 @@ if [ -e helm/hpcc/Chart.yaml ] ; then
     doit "git tag $FORCE $HPCC_MAJOR.$HPCC_MINOR.$HPCC_POINT && git push $REMOTE $HPCC_MAJOR.$HPCC_MINOR.$HPCC_POINT $FORCE"
   fi
   doit "git push $REMOTE master $FORCE"
-  popd
+  doit2 "popd 2>&1 > /dev/null"
 fi

+ 3 - 3
cmake_modules/go_rc.sh

@@ -89,19 +89,19 @@ if [ -e helm/hpcc/Chart.yaml ] ; then
   # We publish any tagged version of helm chart to the helm-chart repo
   # but only copy helm chart sources across for "latest stable" version
   HPCC_DIR="$( pwd )"
-  pushd ../helm-chart 2>&1 > /dev/null
+  doit2 "pushd ../helm-chart 2>&1 > /dev/null"
   doit "git fetch $REMOTE"
   doit "git checkout master"
   doit "git merge --ff-only $REMOTE/master"
   doit "git submodule update --init --recursive"
   HPCC_PROJECTS=hpcc-helm
   HPCC_NAME=HPCC
-  cd docs
+  doit2 "cd docs"
   doit "helm package ${HPCC_DIR}/helm/hpcc/"
   doit "helm repo index . --url https://hpcc-systems.github.io/helm-chart"
   doit "git add *.tgz"
   
   doit "git commit -a -s -m \"$HPCC_NAME Helm Charts $HPCC_SHORT_TAG Release Candidate $HPCC_SEQUENCE\""
   doit "git push $REMOTE master $FORCE"
-  popd
+  doit2 "popd 2>&1 > /dev/null"
 fi

+ 6 - 0
cmake_modules/parse_cmake.sh

@@ -110,6 +110,12 @@ function doit()
     if [ -z "$DRYRUN" ] ; then eval $1 ; fi
 }
 
+function doit2()
+{
+    if [ -n "$VERBOSE" ] || [ -n "$DRYRUN" ] ; then echo $1 ; fi
+    eval $1
+}
+
 function set_tag()
 {
     local _prefix=$1