Last active
December 19, 2015 19:48
-
-
Save megazalrock/6008456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#ブランチ名の取得 | |
branch=$(git rev-parse --symbolic --abbrev-ref $1) | |
test_dir=$HOME/www/test.grandam.jp/html | |
product_dir=$HOME/www/grandam.jp/html | |
repo_dir=$HOME/git/grandam.git | |
#テスト環境に反映 | |
if [ "$branch" = "master" ] | |
then | |
cd $test_dir | |
git --git-dir=.git pull $repo_dir master | |
fi | |
#本番環境に反映 | |
if [ "$branch" = "product" ] | |
then | |
cd $product_dir | |
git --git-dir=.git pull $repo_dir product | |
fi | |
exec git update-server-info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment