Sha256: 0da386ccafdf8c3f8ce73a07ef2659e7e74581e0b8ab2ba1ff01b25320326fb0

Contents?: true

Size: 515 Bytes

Versions: 13

Compression:

Stored size: 515 Bytes

Contents

namespace :deploy do
  desc "Create a release tag and push it"
  task :push_deploy_tag do
    user     = `git config --get user.name`.chomp
    email    = `git config --get user.email`.chomp
    tag_name = "#{Time.now.strftime("%Y-%m-%d__%H_%M_%S")}__#{fetch(:stage)}"
    revision = fetch(:current_revision)

    message = "Deployed by #{user} <#{email}>"

    run_locally do
      execute "git tag #{tag_name} #{revision} -m \"#{message}\""
      execute "git push origin refs/tags/#{tag_name}"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
capistrano-twingly-4.2.0 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-4.1.0 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-4.0.4 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-4.0.3 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-4.0.2 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-4.0.1 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-4.0.0 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-3.0.0 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-2.4.1 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-2.4.0 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-2.3.0 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-2.2.0 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake
capistrano-twingly-2.1.0 lib/capistrano/twingly/tasks/tag_deploy_in_git.rake