From b8e03e9acd9a6bdae60e34aae77e197df8b8b1d0 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 18 Apr 2012 13:22:38 -0400 Subject: [PATCH] only do deployment gemfile generation after successful remote-only generation. good for ripping out testing libraries from deploys, but still keeping them around for running the default rake task --- template/script/hooks/pre-commit | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/template/script/hooks/pre-commit b/template/script/hooks/pre-commit index fc9f07f..d5dc180 100755 --- a/template/script/hooks/pre-commit +++ b/template/script/hooks/pre-commit @@ -2,6 +2,14 @@ OLD_GIT_DIR=$GIT_DIR +if [ "$(penchant gemfile-env)" != "remote" ]; then + penchant gemfile remote +fi + +bundle exec rake +R=$? +if [ $R -ne 0 ]; then exit $R; fi + if [ "$(penchant gemfile-env)" != "remote deployment" ]; then unset GIT_DIR penchant gemfile remote --deployment @@ -9,7 +17,3 @@ if [ "$(penchant gemfile-env)" != "remote deployment" ]; then git add Gemfile* fi -bundle exec rake -R=$? -if [ $R -ne 0 ]; then exit $R; fi -