Skip to content

Instantly share code, notes, and snippets.

@jwreagor
Created November 13, 2009 14:34
Show Gist options
  • Save jwreagor/233859 to your computer and use it in GitHub Desktop.
Save jwreagor/233859 to your computer and use it in GitHub Desktop.
set :git_tagging, true
set :tag_stamp, Time.now.strftime("%Y%m%d%H%M%S")
set :tag_name, ENV['TAG'] || "#{tag_stamp}-REL-#{rails_env}"
desc 'Git related recipes'
namespace :git do
desc 'pulls down submodules after performing a deployment'
task :submodules do
run "cd #{deploy_to}/current &&
git submodule init &&
git submodule update"
end
desc 'Tag the current branch for a release'
task :tag do
system "git tag -a -m 'Tagged for release on #{tag_stamp}' #{tag_name}"
system "git push --tags"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment