Skip to content

Commit

Permalink
do not run tests if all passed for the latest commit already
Browse files Browse the repository at this point in the history
  • Loading branch information
karhatsu committed May 4, 2014
1 parent f0332f3 commit b18f5ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 1 addition & 7 deletions deploy_to_production.sh
@@ -1,12 +1,6 @@
#!/bin/sh
set -e
if [ "$(cat STABLE_COMMIT)" != "$(git rev-list --max-count=1 HEAD)" ]
then
echo "Running all tests..."
./run_all_tests.sh
else
echo "No need to run tests."
fi
./run_all_tests.sh
git push production master
heroku run rake db:migrate --app hirvi
heroku restart --app hirvi
Expand Down
14 changes: 10 additions & 4 deletions run_all_tests.sh
@@ -1,6 +1,12 @@
#!/bin/sh
set -e
spring rspec spec
spring cucumber --format progress features
spring cucumber -p js --format progress features
git rev-list --max-count=1 HEAD > STABLE_COMMIT
if [ "$(cat STABLE_COMMIT)" != "$(git rev-list --max-count=1 HEAD)" ]
then
echo "Running all tests..."
spring rspec spec
spring cucumber --format progress features
spring cucumber -p js --format progress features
git rev-list --max-count=1 HEAD > STABLE_COMMIT
else
echo "No need to run tests."
fi

0 comments on commit b18f5ce

Please sign in to comment.