launcher: only try to self-update if we're on master branch
authorMichael Brown <michael.brown@discourse.org>
Thu, 31 Jul 2014 05:22:55 +0000 (01:22 -0400)
committerMichael Brown <michael.brown@discourse.org>
Thu, 31 Jul 2014 05:27:20 +0000 (01:27 -0400)
launcher

index f03d06d8d945cdc9d6d646d9db87b8ce44d67af3..bfd79921ddb451910005557e11cf0a7918a329b5 100755 (executable)
--- a/launcher
+++ b/launcher
@@ -432,8 +432,10 @@ case "$command" in
       ;;
 
   rebuild)
-      echo "Updating discourse docker"
-      git pull || (echo 'failed to update' && exit 1)
+      if [ "$(git symbolic-ref --short HEAD)" == "master" ]; then
+        echo "Updating discourse docker"
+        git pull || (echo 'failed to update' && exit 1)
+      fi
       if [ -e $cidfile ]
         then
           echo "Stopping old container"