Skip to content

Instantly share code, notes, and snippets.

@dreamr
Created July 7, 2011 05:16
Show Gist options
  • Save dreamr/1068924 to your computer and use it in GitHub Desktop.
Save dreamr/1068924 to your computer and use it in GitHub Desktop.
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