Bugfix config:check error detection in Rails upgrade scripts.
authorBrett Smith <brett@curoverse.com>
Sun, 5 Jul 2015 15:55:25 +0000 (11:55 -0400)
committerBrett Smith <brett@curoverse.com>
Sun, 5 Jul 2015 15:55:25 +0000 (11:55 -0400)
The previous code was capturing the exit status of echo, which isn't
very interesting.  No issue #.

jenkins/arvados-api-server-extras/arvados-api-server-upgrade.sh
jenkins/arvados-workbench-extras/arvados-workbench-upgrade.sh

index cf32fdbd6b854881ddece3962819dc016bd81263..5af5487998bfb7f84c09a5ee9773a35c872fee4c 100755 (executable)
@@ -45,10 +45,9 @@ chmod 644 $SHARED_PATH/log/*
 echo "Done."
 
 echo "Running sanity check"
-(cd $RELEASE_PATH; RAILS_ENV=production bundle exec rake config:check)
-echo "Done."
-
+(cd $RELEASE_PATH && RAILS_ENV=production bundle exec rake config:check)
 SANITY_CHECK_EXIT_CODE=$?
+echo "Done."
 
 if [[ "$SANITY_CHECK_EXIT_CODE" != "0" ]]; then
   echo "Sanity check failed, aborting. Please roll back to the previous version of the package."
index 33e05d35b72113e43ae697ee13ef2418b72d4d37..5b89ec74b7bd14d728821448de2d04318f1c1965 100755 (executable)
@@ -39,10 +39,9 @@ chmod 644 $SHARED_PATH/log/*
 echo "Done."
 
 echo "Running sanity check"
-(cd $RELEASE_PATH; RAILS_ENV=production bundle exec rake config:check)
-echo "Done."
-
+(cd $RELEASE_PATH && RAILS_ENV=production bundle exec rake config:check)
 SANITY_CHECK_EXIT_CODE=$?
+echo "Done."
 
 if [[ "$SANITY_CHECK_EXIT_CODE" != "0" ]]; then
   echo "Sanity check failed, aborting. Please roll back to the previous version of the package."