Cleaned up
authorLisa Marie Maginnis <lisam@fsf.org>
Wed, 8 Jul 2015 19:45:55 +0000 (15:45 -0400)
committerLisa Marie Maginnis <lisam@fsf.org>
Wed, 8 Jul 2015 19:45:55 +0000 (15:45 -0400)
trustcommerce.git/post-update

index 1a749a8828156493897772785e599c0ce2ddf519..c08b3b0cca3f6b4cfd59bd4ad2b7de854796b871 100755 (executable)
@@ -13,11 +13,12 @@ package_host=agpl.fsf.org
 package_name=trustcommerce
 
 repository=/home/git/repositories/trustcommerce.git
-target_path=/var/www/civicrm_custom/extensions/org.fsf.payment.trustcommerce
 remote_user=vcshookuser
+target_path=~$remote_user/stage/org.fsf.payment.trustcommerce/
 
-echo -n $(date "$date_fmt"); echo " - Starting post-update hook..."
+deploy_script=/usr/local/bin/deploy_tc.sh
 
+echo -n $(date "$date_fmt"); echo " - Starting post-update hook..."
 
 # Unset GIT_DIR to allow for calls to git clone/pull
 git update-server-info 
@@ -69,7 +70,7 @@ echo -n $(date "$date_fmt"); echo " - Pushing files to target host"
 rsync -arzSPX --exclude=.git/ --delete $local_checkout/* $remote_user@$target_host:$target_path/ #2>/dev/null
 
 echo -n $(date "$date_fmt"); echo " - Updating target path permissions"
-ssh $remote_user@$target_host "find $remote_path -type f -print0 | xargs -0 chmod 644 && find $remote_path -type d -print0 | xargs -0 chmod 755" # 2>/dev/null
+ssh $remote_user@$target_host sudo $deploy_script
 
 echo -n $(date "$date_fmt"); echo " - Packing for export to package host"
 rm -f $local_checkout_base/*tar.gz