via http://ozm
gitのrefspecがよくわからなくて、調べていたら出会った記事です。
.git/hooks /pre-commi tをshellスクリプトで
1 $ chmod 744 .git/hooks/pre-commi t 2 $ cat .git/hooks /pre-commi t 3 #!/bin/sh 4 rake test
こういうのもありました。
http://rei
1 #!/bin/sh 2 rake spec 2> /dev/null
.git/hooks /pre-commi tをrubyで
1 $ cat .git/hooks/pre-commi t 2 #!/usr/bin/e nv ruby 3 if `whoami`.strip != 'deploy' 4 puts "You need to be `deploy`!" 5 exit 1 6 else 7 exit 0 8 end
その他のhooks
.git/hooks
1 post-commit 2 post-recei ve 3 post-updat e 4 pre-applyp atch 5 pre-commit 6 pre-rebase
pre-push hookはないのか
と思ったら、こういうパッチを書いている方がいます。パッチほとんどやったことないので、今度やってみよう。
posted by
satoko
on Thu 30 Oct 2008
at 16:34