updated ryf hook
authorLisa Marie Maginnis <lisam@fsf.org>
Tue, 5 Jul 2016 17:33:07 +0000 (13:33 -0400)
committerLisa Marie Maginnis <lisam@fsf.org>
Tue, 5 Jul 2016 17:33:07 +0000 (13:33 -0400)
ryf.git/post-update.ryf.fsf.org

index 344964d38e002c6f1f45ad2adde471dc23853fc0..338f315288b29ad837585cc1b3adb6825103cc78 100755 (executable)
@@ -11,16 +11,18 @@ unset GIT_DIR
 SELF=ryf.git
 REPO_DIR=$HOME/repositories
 CHECKOUT_DIR=$HOME/local/checkouts/$SELF
-TARGET_DIR=/var/www/ryf.fsf.org
+TARGET_DIR=/var/www
 TARGET_HOST=ryf.fsf.org
 
 
 case $1 in
     refs/heads/live)
        branch=live
+       TARGET_DIR=$TARGET_DIR/ryf.fsf.org
        ;;
     refs/heads/dev)
        branch=dev
+       TARGET_DIR=$TARGET_DIR/ryf-dev.fsf.org
        ;;
 *)
        echo "No action for this branch!"
@@ -40,7 +42,7 @@ else
 fi
 
 if [ -n $TARGET_HOST ]; then
-    echo Deploying to: $branch
+    echo Deploying to: $TARGET_DIR
     rsync -avrSPX --delete-after $CHECKOUT_DIR/* root@$TARGET_HOST:$TARGET_DIR/
 fi