capistrano-gitflow 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/capistrano-gitflow.gemspec +4 -5
- data/lib/capistrano/gitflow.rb +17 -16
- metadata +4 -16
- data/gitflow.gemspec +0 -60
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.3.
|
|
1
|
+
1.3.4
|
data/capistrano-gitflow.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{capistrano-gitflow}
|
|
8
|
-
s.version = "1.3.
|
|
8
|
+
s.version = "1.3.4"
|
|
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-06-
|
|
12
|
+
s.date = %q{2010-06-23}
|
|
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 = [
|
|
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
|
|
|
21
21
|
"Rakefile",
|
|
22
22
|
"VERSION",
|
|
23
23
|
"capistrano-gitflow.gemspec",
|
|
24
|
-
"gitflow.gemspec",
|
|
25
24
|
"lib/capistrano/gitflow.rb",
|
|
26
25
|
"lib/capistrano/gitflow/natcmp.rb",
|
|
27
26
|
"recipes/gitflow_recipes.rb",
|
|
@@ -32,7 +31,7 @@ Gem::Specification.new do |s|
|
|
|
32
31
|
s.homepage = %q{http://github.com/technicalpickles/capistrano-gitflow}
|
|
33
32
|
s.rdoc_options = ["--charset=UTF-8"]
|
|
34
33
|
s.require_paths = ["lib"]
|
|
35
|
-
s.rubygems_version = %q{1.3.
|
|
34
|
+
s.rubygems_version = %q{1.3.6}
|
|
36
35
|
s.summary = %q{Capistrano recipe for a deployment workflow based on git tags}
|
|
37
36
|
s.test_files = [
|
|
38
37
|
"spec/gitflow_spec.rb",
|
|
@@ -43,7 +42,7 @@ Gem::Specification.new do |s|
|
|
|
43
42
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
44
43
|
s.specification_version = 3
|
|
45
44
|
|
|
46
|
-
if Gem::Version.new(Gem::
|
|
45
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
47
46
|
s.add_runtime_dependency(%q<capistrano>, [">= 0"])
|
|
48
47
|
s.add_runtime_dependency(%q<stringex>, [">= 0"])
|
|
49
48
|
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
data/lib/capistrano/gitflow.rb
CHANGED
|
@@ -27,6 +27,22 @@ module Capistrano
|
|
|
27
27
|
last_tag_matching('staging-*')
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
def next_staging_tag
|
|
31
|
+
hwhen = Date.today.to_s
|
|
32
|
+
who = `whoami`.chomp.to_url
|
|
33
|
+
what = Capistrano::CLI.ui.ask("What does this release introduce? (this will be normalized and used in the tag for this release) ").to_url
|
|
34
|
+
|
|
35
|
+
last_staging_tag = last_tag_matching("staging-#{hwhen}-*")
|
|
36
|
+
new_tag_serial = if last_staging_tag && last_staging_tag =~ /staging-[0-9]{4}-[0-9]{2}-[0-9]{2}\-([0-9]*)/
|
|
37
|
+
$1.to_i + 1
|
|
38
|
+
else
|
|
39
|
+
1
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
require 'ruby-debug';breakpoint
|
|
43
|
+
"#{stage}-#{hwhen}-#{new_tag_serial}-#{who}-#{what}"
|
|
44
|
+
end
|
|
45
|
+
|
|
30
46
|
def last_production_tag()
|
|
31
47
|
last_tag_matching('production-*')
|
|
32
48
|
end
|
|
@@ -101,27 +117,12 @@ Please make sure you have pulled and pushed all code before deploying:
|
|
|
101
117
|
|
|
102
118
|
desc "Mark the current code as a staging/qa release"
|
|
103
119
|
task :tag_staging do
|
|
104
|
-
# find latest staging tag for today
|
|
105
|
-
new_tag_date = Date.today.to_s
|
|
106
|
-
new_tag_serial = 1
|
|
107
|
-
|
|
108
|
-
who = `whoami`.chomp.to_url
|
|
109
|
-
what = Capistrano::CLI.ui.ask("What does this release introduce? (this will be normalized and used in the tag for this release) ").to_url
|
|
110
|
-
|
|
111
|
-
last_staging_tag = last_tag_matching("staging-#{new_tag_date}.*")
|
|
112
|
-
if last_staging_tag
|
|
113
|
-
# calculate largest serial and increment
|
|
114
|
-
last_staging_tag =~ /staging-[0-9]{4}-[0-9]{2}-[0-9]{2}\-([0-9]*)/
|
|
115
|
-
new_tag_serial = $1.to_i + 1
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
new_staging_tag = "#{stage}-#{new_tag_date}-#{new_tag_serial}-#{who}-#{what}"
|
|
119
|
-
|
|
120
120
|
current_sha = `git log --pretty=format:%H HEAD -1`
|
|
121
121
|
last_staging_tag_sha = if last_staging_tag
|
|
122
122
|
`git log --pretty=format:%H #{last_staging_tag} -1`
|
|
123
123
|
end
|
|
124
124
|
|
|
125
|
+
new_staging_tag = next_staging_tag
|
|
125
126
|
if last_staging_tag_sha == current_sha
|
|
126
127
|
puts "Not re-tagging staging because the most recent tag (#{last_staging_tag}) already points to current head"
|
|
127
128
|
new_staging_tag = last_staging_tag
|
metadata
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capistrano-gitflow
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash: 29
|
|
5
4
|
prerelease: false
|
|
6
5
|
segments:
|
|
7
6
|
- 1
|
|
8
7
|
- 3
|
|
9
|
-
-
|
|
10
|
-
version: 1.3.
|
|
8
|
+
- 4
|
|
9
|
+
version: 1.3.4
|
|
11
10
|
platform: ruby
|
|
12
11
|
authors:
|
|
13
12
|
- Joshua Nichols
|
|
@@ -15,18 +14,16 @@ autorequire:
|
|
|
15
14
|
bindir: bin
|
|
16
15
|
cert_chain: []
|
|
17
16
|
|
|
18
|
-
date: 2010-06-
|
|
17
|
+
date: 2010-06-23 00:00:00 -04:00
|
|
19
18
|
default_executable:
|
|
20
19
|
dependencies:
|
|
21
20
|
- !ruby/object:Gem::Dependency
|
|
22
21
|
name: capistrano
|
|
23
22
|
prerelease: false
|
|
24
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
|
25
|
-
none: false
|
|
26
24
|
requirements:
|
|
27
25
|
- - ">="
|
|
28
26
|
- !ruby/object:Gem::Version
|
|
29
|
-
hash: 3
|
|
30
27
|
segments:
|
|
31
28
|
- 0
|
|
32
29
|
version: "0"
|
|
@@ -36,11 +33,9 @@ dependencies:
|
|
|
36
33
|
name: stringex
|
|
37
34
|
prerelease: false
|
|
38
35
|
requirement: &id002 !ruby/object:Gem::Requirement
|
|
39
|
-
none: false
|
|
40
36
|
requirements:
|
|
41
37
|
- - ">="
|
|
42
38
|
- !ruby/object:Gem::Version
|
|
43
|
-
hash: 3
|
|
44
39
|
segments:
|
|
45
40
|
- 0
|
|
46
41
|
version: "0"
|
|
@@ -50,11 +45,9 @@ dependencies:
|
|
|
50
45
|
name: rspec
|
|
51
46
|
prerelease: false
|
|
52
47
|
requirement: &id003 !ruby/object:Gem::Requirement
|
|
53
|
-
none: false
|
|
54
48
|
requirements:
|
|
55
49
|
- - ">="
|
|
56
50
|
- !ruby/object:Gem::Version
|
|
57
|
-
hash: 13
|
|
58
51
|
segments:
|
|
59
52
|
- 1
|
|
60
53
|
- 2
|
|
@@ -76,7 +69,6 @@ files:
|
|
|
76
69
|
- Rakefile
|
|
77
70
|
- VERSION
|
|
78
71
|
- capistrano-gitflow.gemspec
|
|
79
|
-
- gitflow.gemspec
|
|
80
72
|
- lib/capistrano/gitflow.rb
|
|
81
73
|
- lib/capistrano/gitflow/natcmp.rb
|
|
82
74
|
- recipes/gitflow_recipes.rb
|
|
@@ -93,27 +85,23 @@ rdoc_options:
|
|
|
93
85
|
require_paths:
|
|
94
86
|
- lib
|
|
95
87
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
|
-
none: false
|
|
97
88
|
requirements:
|
|
98
89
|
- - ">="
|
|
99
90
|
- !ruby/object:Gem::Version
|
|
100
|
-
hash: 3
|
|
101
91
|
segments:
|
|
102
92
|
- 0
|
|
103
93
|
version: "0"
|
|
104
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
|
-
none: false
|
|
106
95
|
requirements:
|
|
107
96
|
- - ">="
|
|
108
97
|
- !ruby/object:Gem::Version
|
|
109
|
-
hash: 3
|
|
110
98
|
segments:
|
|
111
99
|
- 0
|
|
112
100
|
version: "0"
|
|
113
101
|
requirements: []
|
|
114
102
|
|
|
115
103
|
rubyforge_project:
|
|
116
|
-
rubygems_version: 1.3.
|
|
104
|
+
rubygems_version: 1.3.6
|
|
117
105
|
signing_key:
|
|
118
106
|
specification_version: 3
|
|
119
107
|
summary: Capistrano recipe for a deployment workflow based on git tags
|
data/gitflow.gemspec
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Generated by jeweler
|
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
|
4
|
-
# -*- encoding: utf-8 -*-
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |s|
|
|
7
|
-
s.name = %q{gitflow}
|
|
8
|
-
s.version = "1.3.0"
|
|
9
|
-
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
|
-
s.authors = ["Joshua Nichols"]
|
|
12
|
-
s.date = %q{2010-06-15}
|
|
13
|
-
s.description = %q{Capistrano recipe for a deployment workflow based on git tags}
|
|
14
|
-
s.email = %q{josh@technicalpickles.com}
|
|
15
|
-
s.extra_rdoc_files = [
|
|
16
|
-
"README.rdoc"
|
|
17
|
-
]
|
|
18
|
-
s.files = [
|
|
19
|
-
".document",
|
|
20
|
-
"README.rdoc",
|
|
21
|
-
"Rakefile",
|
|
22
|
-
"VERSION",
|
|
23
|
-
"gitflow.gemspec",
|
|
24
|
-
"lib/capistrano/gitflow.rb",
|
|
25
|
-
"lib/capistrano/gitflow/natcmp.rb",
|
|
26
|
-
"recipes/gitflow_recipes.rb",
|
|
27
|
-
"spec/gitflow_spec.rb",
|
|
28
|
-
"spec/spec.opts",
|
|
29
|
-
"spec/spec_helper.rb"
|
|
30
|
-
]
|
|
31
|
-
s.homepage = %q{http://github.com/technicalpickles/gitflow}
|
|
32
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
|
33
|
-
s.require_paths = ["lib"]
|
|
34
|
-
s.rubygems_version = %q{1.3.6}
|
|
35
|
-
s.summary = %q{Capistrano recipe for a deployment workflow based on git tags}
|
|
36
|
-
s.test_files = [
|
|
37
|
-
"spec/gitflow_spec.rb",
|
|
38
|
-
"spec/spec_helper.rb"
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
if s.respond_to? :specification_version then
|
|
42
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
43
|
-
s.specification_version = 3
|
|
44
|
-
|
|
45
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
|
46
|
-
s.add_runtime_dependency(%q<capistrano>, [">= 0"])
|
|
47
|
-
s.add_runtime_dependency(%q<stringex>, [">= 0"])
|
|
48
|
-
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
|
49
|
-
else
|
|
50
|
-
s.add_dependency(%q<capistrano>, [">= 0"])
|
|
51
|
-
s.add_dependency(%q<stringex>, [">= 0"])
|
|
52
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
|
53
|
-
end
|
|
54
|
-
else
|
|
55
|
-
s.add_dependency(%q<capistrano>, [">= 0"])
|
|
56
|
-
s.add_dependency(%q<stringex>, [">= 0"])
|
|
57
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
|