step-up 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/GEM_VERSION +1 -1
- data/lib/step-up/cli.rb +26 -3
- metadata +8 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18b66f3cb606e91efdfa44298f2c67e501706faa
|
4
|
+
data.tar.gz: cdb0092f51b4175246f5a566cb0a588645daf266
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b9910e9585e16041d9b1111a723a1609a0cc0c60eb6062f85b4c7bf3e27b2f480c9f2ccccde470b95b0e33574808d1daeeedeec504c09ff285eb8cacb7a7ff7
|
7
|
+
data.tar.gz: fc6144a4e0d7e77a9c37de1ab8809360035082673a2445151210ca524a972e50c1ca8c7adc6268fb8abfbba9721d1e814cd14ebf29ab353ddec4d8f78ecf0e0a
|
data/GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
v0.9.
|
1
|
+
v0.9.4
|
data/lib/step-up/cli.rb
CHANGED
@@ -15,6 +15,7 @@ module StepUp
|
|
15
15
|
method_options %w(level -l) => :string, %w(steps -s) => :boolean, %w(message -m) => :string, :'no-editor' => :boolean # $ stepup version create [--level|-l <level-name>] [--steps|-s] [--message|-m <comment-string>] [--no-editor]
|
16
16
|
method_options %w(mask -M) => :string # stepup version show --mask development_hudson_build_0
|
17
17
|
method_options %w(masks) => :string # stepup version show --masks
|
18
|
+
method_options %w(format -f) => :string
|
18
19
|
VERSION_ACTIONS = %w[show create help]
|
19
20
|
def version(action = nil, commit_base = nil)
|
20
21
|
unless VERSION_ACTIONS.include?(action)
|
@@ -253,6 +254,7 @@ module StepUp
|
|
253
254
|
end
|
254
255
|
|
255
256
|
def version_show
|
257
|
+
formats = %w[default mvn mvn-snapshot]
|
256
258
|
if options[:levels]
|
257
259
|
puts "Current version levels:"
|
258
260
|
version_levels.each do |level|
|
@@ -270,14 +272,35 @@ module StepUp
|
|
270
272
|
end
|
271
273
|
puts masks.join("\n") if masks.any?
|
272
274
|
else
|
275
|
+
format = options[:format] || "default"
|
276
|
+
unless formats.member?(format)
|
277
|
+
puts "Unknown format #{format.inspect}. Must be one of #{formats.inspect}"
|
278
|
+
exit 1
|
279
|
+
end
|
273
280
|
mask = options[:mask]
|
274
281
|
mask = nil if mask !~ /0/
|
282
|
+
version = nil
|
275
283
|
if options[:"next-release"]
|
276
|
-
tag = driver.
|
277
|
-
|
284
|
+
tag = driver.cached_next_version_tag(commit_object, options[:level])
|
285
|
+
version = tag
|
278
286
|
else
|
279
|
-
|
287
|
+
version = driver(mask).last_version_tag(commit_object || "HEAD", true)
|
288
|
+
end
|
289
|
+
return unless version
|
290
|
+
if format =~ /\Amvn/
|
291
|
+
if version =~ /\+/
|
292
|
+
suf = $'
|
293
|
+
version = driver.cached_next_version_tag(commit_object, options[:level])
|
294
|
+
version = "#{ version }+#{ suf }"
|
295
|
+
end
|
296
|
+
version = version.gsub(/^\D+/, '')
|
297
|
+
if format == "mvn-snapshot"
|
298
|
+
version = version.gsub(/(\d+)\+\d*$/){ |c| "#{$1}-SNAPSHOT" }
|
299
|
+
elsif format == "mvn"
|
300
|
+
version = version.gsub(/(\d+)\+(\d*)$/){ |c| "#{$1}.rc#{$2}" }
|
301
|
+
end
|
280
302
|
end
|
303
|
+
puts version
|
281
304
|
end
|
282
305
|
end
|
283
306
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: step-up
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Manzan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -79,16 +79,16 @@ files:
|
|
79
79
|
- lib/step-up/parser/version_mask.rb
|
80
80
|
- lib/step-up/ranged_notes.rb
|
81
81
|
- lib/step-up/version.rb
|
82
|
-
- templates/default/Capfile
|
83
|
-
- templates/default/Gemfile
|
84
|
-
- templates/default/Rakefile
|
85
|
-
- templates/default/lib/version.rb
|
86
|
-
- GEM_VERSION
|
87
82
|
- spec/lib/config_spec.rb
|
88
83
|
- spec/lib/step-up/driver/git_spec.rb
|
89
84
|
- spec/lib/step-up/parser/version_mask_spec.rb
|
90
85
|
- spec/lib/step-up/ranged_notes_spec.rb
|
91
86
|
- spec/spec_helper.rb
|
87
|
+
- templates/default/Capfile
|
88
|
+
- templates/default/Gemfile
|
89
|
+
- templates/default/Rakefile
|
90
|
+
- templates/default/lib/version.rb
|
91
|
+
- GEM_VERSION
|
92
92
|
homepage: https://github.com/kawamanza/step-up
|
93
93
|
licenses: []
|
94
94
|
metadata: {}
|
@@ -112,9 +112,4 @@ rubygems_version: 2.0.3
|
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: The best way to manage your project's versioning
|
115
|
-
test_files:
|
116
|
-
- spec/lib/config_spec.rb
|
117
|
-
- spec/lib/step-up/driver/git_spec.rb
|
118
|
-
- spec/lib/step-up/parser/version_mask_spec.rb
|
119
|
-
- spec/lib/step-up/ranged_notes_spec.rb
|
120
|
-
- spec/spec_helper.rb
|
115
|
+
test_files: []
|