0
내가 쓴 스크립트 작동하지 않는 게시물 커밋 .. 그것은 ZIP 파일 만을 만드는 것지퍼로 잠그는 파일 후크 <code>post-commit</code> 후크 커밋 마지막 ZIP하는
#!/bin/sh
echo "[post-commit] Commit done!"
exec < /dev/tty
while true; do
read -p "[post-commit] Archive this commit? (Y/n) " yn
if [ "$yn" = "" ]; then
yn='Y'
fi
case $yn in
[Yy]) exec git archive -o $(git log -1 --pretty=%B).zip $(git rev-parse HEAD) $(git diff --name-only $(git rev-parse HEAD)^..$(git rev-parse HEAD)); break;;
[Nn]) exit;;
*) echo "Please answer Yy or Nn for yes or no.";;
esac
done
을 빈을, 그것은 변경된 파일을 저장하지 않는 것 ...
누구나 나쁘다는 것을 알 수 있습니까?
감사합니다. 감사합니다. :) –
@David 또한, 당신은'rev-parse'를 과도하게 사용하고 있습니다. git 명령의 대부분은'HEAD'로 잘 작동합니다. – kan