From 10de06dd70d816747a62124686d6fbbb83ad1ee2 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Thu, 5 Dec 2013 10:29:17 +0100 Subject: [PATCH] misc --- test_remote_git_deployement.txt | 67 --------------------------------- 1 file changed, 67 deletions(-) delete mode 100755 test_remote_git_deployement.txt diff --git a/test_remote_git_deployement.txt b/test_remote_git_deployement.txt deleted file mode 100755 index f8801916..00000000 --- a/test_remote_git_deployement.txt +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash -#hook/pre-receive -#CONFIG - -echo "- - - - PRE-RECEIVE - - - -" -REPO="sites/all/modules/features" -echo $REPO - -#read oldrev newrev refname -refname="refs/heads/sandbox" -if [ $refname = "refs/heads/prod" ]; then - BASE="public_html/base_d7" -elif [ $refname = "refs/heads/sandbox" ]; then - BASE="public_html/base_d7_sb" -else - BASE="none" -fi - -echo $BASE - -if [ $BASE != "none" ]; then - echo "===== UPDATE REPOSITORY | $refname =====" - unset GIT_DIR - cd ~ - cd $BASE - cd $REPO - git add . - git commit -m "Auto Commit" - echo "====== OK =====" -else - echo "Warning Commit not deployed, please use sandbox or prod branch" -fi - - -#!/bin/bash -#hook/post-receive -#CONFIG -echo "- - - - POST-RECEIVE - - - - " -REPO="sites/all/modules/features" -echo $REPO - -#read oldrev newrev refname -refname="refs/heads/prod" -if [ $refname = "refs/heads/prod" ]; then - BASE="public_html/base_d7" -elif [ $refname = "refs/heads/sandbox" ]; then - BASE="public_html/base_d7_sb" -else - BASE="none" -fi -echo $BASE -if [ $BASE != "none" ]; then - echo "===== DEPLOYING APP | $refname =====" - unset GIT_DIR - cd ~ - cd $BASE - cd $REPO - if [ $refname = "refs/heads/prod" ]; then - git pull --ff-only origin prod - elif [ $refname = "refs/heads/sandbox" ]; then - git pull --ff-only origin sandbox - fi - echo $? - echo "====== OK =====" -else - echo "Warning : Commit not deployed, please use prod branch" -fi \ No newline at end of file