capistrano-gitflow 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.2
1
+ 1.4.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{capistrano-gitflow}
8
- s.version = "1.4.2"
8
+ s.version = "1.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Joshua Nichols"]
12
- s.date = %q{2010-11-30}
12
+ s.date = %q{2011-04-07}
13
13
  s.description = %q{Capistrano recipe for a deployment workflow based on git tags}
14
14
  s.email = %q{josh@technicalpickles.com}
15
15
  s.extra_rdoc_files = [
@@ -61,7 +61,7 @@ Your #{local_branch} branch is not up to date with origin/#{local_branch}.
61
61
  Please make sure you have pulled and pushed all code before deploying:
62
62
 
63
63
  git pull origin #{local_branch}
64
- #run tests, etc
64
+ # run tests, etc
65
65
  git push origin #{local_branch}
66
66
 
67
67
  """
@@ -75,11 +75,13 @@ Please make sure you have pulled and pushed all code before deploying:
75
75
  # make sure we have any other deployment tags that have been pushed by others so our auto-increment code doesn't create conflicting tags
76
76
  `git fetch`
77
77
 
78
- send "tag_#{stage}" if respond_to?(stage)
78
+ if respond_to?("tag_#{stage}")
79
+ send "tag_#{stage}"
79
80
 
80
- system "git push --tags origin #{local_branch}"
81
- if $? != 0
82
- abort "git push failed"
81
+ system "git push --tags origin #{local_branch}"
82
+ if $? != 0
83
+ abort "git push failed"
84
+ end
83
85
  end
84
86
  end
85
87
  end
@@ -130,7 +132,7 @@ Please make sure you have pulled and pushed all code before deploying:
130
132
  end
131
133
 
132
134
  if last_staging_tag_sha == current_sha
133
- puts "Not re-tagging staging because the most recent tag (#{last_staging_tag}) already points to current head"
135
+ puts "Not re-tagging staging because latest tag (#{last_staging_tag}) already points to HEAD"
134
136
  new_staging_tag = last_staging_tag
135
137
  else
136
138
  new_staging_tag = next_staging_tag
@@ -153,16 +155,23 @@ Please make sure you have pulled and pushed all code before deploying:
153
155
  end
154
156
 
155
157
  promote_to_production_tag =~ /^staging-(.*)$/
156
- new_production_tag = "production-#{$1}"
157
- puts "Preparing to promote staging tag #{promote_to_production_tag} to production as #{new_production_tag}'"
158
- unless capistrano_configuration[:tag]
159
- really_deploy = Capistrano::CLI.ui.ask("Do you really want to deploy #{new_production_tag}? [y/N]").to_url
160
- unless really_deploy =~ /^[Yy]$/
161
- exit(1)
158
+ new_production_tag = "production-#{$1}"
159
+
160
+ if new_production_tag == last_production_tag
161
+ puts "Not re-tagging #{last_production_tag} because it already exists"
162
+ really_deploy = Capistrano::CLI.ui.ask("Do you really want to deploy #{last_production_tag}? [y/N]").to_url
163
+
164
+ exit(1) unless really_deploy =~ /^[Yy]$/
165
+ else
166
+ puts "Preparing to promote staging tag '#{promote_to_production_tag}' to '#{new_production_tag}'"
167
+ unless capistrano_configuration[:tag]
168
+ really_deploy = Capistrano::CLI.ui.ask("Do you really want to deploy #{new_production_tag}? [y/N]").to_url
169
+
170
+ exit(1) unless really_deploy =~ /^[Yy]$/
162
171
  end
172
+ puts "Promoting staging tag #{promote_to_production_tag} to production as '#{new_production_tag}'"
173
+ system "git tag -a -m 'tagging current code for deployment to production' #{new_production_tag} #{promote_to_production_tag}"
163
174
  end
164
- puts "promoting staging tag #{promote_to_production_tag} to production as '#{new_production_tag}'"
165
- system "git tag -a -m 'tagging current code for deployment to production' #{new_production_tag} #{promote_to_production_tag}"
166
175
 
167
176
  set :branch, new_production_tag
168
177
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-gitflow
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
- - 2
10
- version: 1.4.2
9
+ - 3
10
+ version: 1.4.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joshua Nichols
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-30 00:00:00 -05:00
18
+ date: 2011-04-07 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency