yii メモ
moduleで上の階層のlayoutファイルを使う場合、
yiiのネームスペースのエイリアスを使います。
例:
moduleで上の階層のlayoutファイルを使う場合、
yiiのネームスペースのエイリアスを使います。
例:
public $layout='application.views.layouts.console.main';
public $layout='application.views.layouts.console.main';
git remote set-url remote_config_name:/home/userdir/repo
#!/bin/sh
#ブランチ名の取得
branch=$(git rev-parse --symbolic --abbrev-ref $1)
# 本番・テスト環境へ反映
if [ "$branch" = "product" ]
then
cd /home/product_user/public_html
git --git-dir=.git pull ../repo/repo.git product:master
# テスト環境にも反映
cd /home/test_user/public_html
git --git-dir=.git pull ../repo/repo.git product:master
# リモートのbareリポジトリのmasterブランチとproductブランチを入れ替える
cd /home/repo_user/repo/repo.git
git --git-dir=../repo.git symbolic-ref HEAD refs/heads/product
git --git-dir=../repo.git branch -d master
git --git-dir=../repo.git branch -m product master
fi
# テスト環境のみへ反映
if [ "$branch" = "master" ]
then
cd /home/test_user/public_html
git --git-dir=.git pull ../repo/repo.git master
fi
exec git update-server-info
git --git-dir=../repo.git symbolic-ref HEAD refs/heads/productとして、gitディレクトリにrepo.git自身を指定してgit 命令を実行しています。
git symbolic-ref HEAD refs/heads/productこれでbareリポジトリのmasterブランチからproductブランチにcheckoutする事が出来ました。