Created
July 7, 2011 05:16
-
-
Save dreamr/1068924 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task "demo:deploy:prepare" do | |
# run our tests | |
out = `rake test` | |
unless out =~ /0 failures, 0 errors/ | |
raise "Oh Snap! A test seems to have failed! #{out}" | |
end | |
# remove old tag, this can fail and it is ok | |
`git tag -d release` | |
# tag since it passed | |
out = `rake demo:tag && git tag | grep release` | |
unless out =~ /release/ | |
raise "Oh Snap! We couldn't tag the release." | |
end | |
# now release to heroku | |
Rake::Task["demo:deploy"].invoke | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment