Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ef8f3ec46 | ||
|
|
63b13affee | ||
|
|
7ee61ce716 | ||
|
|
6156bbe4e5 | ||
|
|
4a3560b753 |
@@ -8,10 +8,13 @@ but as Capistrano 3 is multistage by default (unlike Cap 2) :stage should
|
||||
already be set, but you can override the variable if you want to change the
|
||||
name of the tag.
|
||||
|
||||
### Requires Capistrano 3
|
||||
### Requires Capistrano 3.7
|
||||
|
||||
As of version 1.0.0, this plugin requires Cap 3. If you need a Capistrano
|
||||
2 compatible version, then use `gem 'capistrano-deploytags', '~> 0.9.2'`
|
||||
As of version 1.0.7, this plugin requires Cap 3.7.
|
||||
|
||||
If you need a Capistrano < 3.7 compatible version, then use `gem 'capistrano-deploytags', '1.0.6'`
|
||||
|
||||
If you need a Capistrano 2 compatible version, then use `gem 'capistrano-deploytags', '~> 0.9.2'`
|
||||
|
||||
### What It Does
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Gem::Specification.new do |s|
|
||||
s.name = 'capistrano-deploytags'
|
||||
s.license = 'BSD-2-Clause'
|
||||
s.version = '1.0.4'
|
||||
s.date = '2015-10-18'
|
||||
s.version = '1.0.7'
|
||||
s.date = '2017-02-07'
|
||||
s.summary = 'Add dated, environment-specific tags to your git repo at each deployment.'
|
||||
s.description = <<-EOS
|
||||
Capistrano Deploytags is a simple plugin to Capistrano 3 that works with your deployment framework to track your code releases. All you have to do is require capistrano-deploytags/capistrano and each deployment will add a new tag for that deployment, pointing to the latest commit. This lets you easily see which code is deployed on each environment, and allows you to figure out which code was running in an environment at any time in the past.
|
||||
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
||||
s.email = ['relistan@gmail.com', 'gavin.heavyside@mydrivesolutions.com']
|
||||
s.files = `git ls-files lib`.split(/\n/) + %w{ README.md LICENSE }
|
||||
s.homepage = 'http://github.com/mydrive/capistrano-deploytags'
|
||||
s.add_dependency 'capistrano', '>= 3.2.0'
|
||||
s.add_dependency 'capistrano', '>= 3.7.0'
|
||||
# s.add_development_dependency 'capistrano-spec'
|
||||
s.add_development_dependency 'rake'
|
||||
s.add_development_dependency 'rspec', '~> 3.0.0'
|
||||
|
||||
@@ -22,7 +22,7 @@ module CapistranoDeploytags
|
||||
|
||||
def self.commit_message(current_sha, stage)
|
||||
if fetch(:deploytag_commit_message, false)
|
||||
deploytag_commit_message
|
||||
fetch(:deploytag_commit_message)
|
||||
else
|
||||
tag_user = (ENV['USER'] || ENV['USERNAME'] || 'deployer').strip
|
||||
"#{tag_user} deployed #{current_sha} to #{stage}"
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace :deploy do
|
||||
raise 'define :branch and :stage'
|
||||
end
|
||||
|
||||
strategy.git "fetch #{fetch(:git_remote, 'origin')}"
|
||||
execute :git, "fetch #{fetch(:git_remote, 'origin')}"
|
||||
|
||||
diff_output = capture :git, "diff #{branch} --shortstat"
|
||||
|
||||
@@ -22,9 +22,9 @@ namespace :deploy do
|
||||
raise 'Dirty git tree'
|
||||
end
|
||||
|
||||
strategy.git "checkout #{branch}"
|
||||
execute :git, "checkout #{branch}"
|
||||
info "Pulling from #{branch}"
|
||||
strategy.git "pull #{fetch(:git_remote, 'origin')} #{branch}"
|
||||
execute :git, "pull #{fetch(:git_remote, 'origin')} #{branch}"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -40,8 +40,8 @@ namespace :deploy do
|
||||
commit_message = CapistranoDeploytags::Helper.commit_message(latest_revision, fetch(:stage))
|
||||
|
||||
unless fetch(:sshkit_backend) == SSHKit::Backend::Printer # unless --dry-run flag present
|
||||
strategy.git "tag -a #{tag_name} -m \"#{commit_message}\" #{latest_revision}"
|
||||
strategy.git "push #{fetch(:git_remote, 'origin')} #{tag_name}"
|
||||
execute :git, "tag -a #{tag_name} -m \"#{commit_message}\" #{latest_revision}"
|
||||
execute :git, "push #{fetch(:git_remote, 'origin')} #{tag_name}"
|
||||
end
|
||||
|
||||
info "[cap-deploy-tagger] Tagged #{latest_revision} with #{tag_name}"
|
||||
|
||||
Reference in New Issue
Block a user