bumper_pusher 0.0.2 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bumper_pusher.gemspec +1 -0
- data/lib/bumper_pusher/bumper.rb +35 -24
- data/lib/bumper_pusher/version.rb +1 -1
- data/lib/bumper_pusher.rb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5a03338bd04427e1d6808132eec3f7e91ac1b5d
|
4
|
+
data.tar.gz: a5b9f8c0588f5668709f553e0a8091d216422a77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d35be1b0835e975e2c32d8b20f45c179c9428377890be31ca0a3ba8dc4b7b22c226c809283b7513fd13825536ddcff333d0ce8482b48f9330b0f902f3c1458af
|
7
|
+
data.tar.gz: 8a057e4585e3647a5eb76a24bc86b8a8a6648ae3a4a76fa57518acf3d5bde2265751178af8f66f89123801cffdfb49ff42e98770aaf4c32fe46bd6414ea137bd
|
data/bumper_pusher.gemspec
CHANGED
data/lib/bumper_pusher/bumper.rb
CHANGED
@@ -23,8 +23,12 @@ module BumperPusher
|
|
23
23
|
if @options[:dry_run]
|
24
24
|
puts 'Repo not clean, "Dry run" enabled -> continue'
|
25
25
|
else
|
26
|
-
|
27
|
-
|
26
|
+
if @options[:beta]
|
27
|
+
puts 'Repo not clean, "Beta build" enabled -> continue'
|
28
|
+
else
|
29
|
+
puts 'Repository not clean -> exit'
|
30
|
+
exit
|
31
|
+
end
|
28
32
|
end
|
29
33
|
end
|
30
34
|
end
|
@@ -123,25 +127,25 @@ module BumperPusher
|
|
123
127
|
bumped_result = versions_array.dup
|
124
128
|
bumped_result.map! { |x| x.to_i }
|
125
129
|
|
126
|
-
case @options[:bump_number]
|
127
|
-
when :major
|
128
|
-
bumped_result[0] += 1
|
129
|
-
bumped_result[1] = 0
|
130
|
-
bumped_result[2] = 0
|
131
|
-
when :minor
|
132
|
-
bumped_result[1] += 1
|
133
|
-
bumped_result[2] = 0
|
134
|
-
when :patch
|
135
|
-
bumped_result[2] += 1
|
136
|
-
else
|
137
|
-
raise('unknown bump_number')
|
138
|
-
end
|
139
|
-
|
140
|
-
|
141
|
-
bumped_version = bumped_result.join('.')
|
142
130
|
if @options[:beta]
|
143
|
-
bumped_version
|
131
|
+
bumped_version = versions_array.join('.') + '.1'
|
132
|
+
else
|
133
|
+
case @options[:bump_number]
|
134
|
+
when :major
|
135
|
+
bumped_result[0] += 1
|
136
|
+
bumped_result[1] = 0
|
137
|
+
bumped_result[2] = 0
|
138
|
+
when :minor
|
139
|
+
bumped_result[1] += 1
|
140
|
+
bumped_result[2] = 0
|
141
|
+
when :patch
|
142
|
+
bumped_result[2] += 1
|
143
|
+
else
|
144
|
+
raise('unknown bump_number')
|
145
|
+
end
|
146
|
+
bumped_version = bumped_result.join('.')
|
144
147
|
end
|
148
|
+
|
145
149
|
puts "Bump version: #{versions_array.join('.')} -> #{bumped_version}"
|
146
150
|
bumped_version
|
147
151
|
end
|
@@ -224,8 +228,10 @@ module BumperPusher
|
|
224
228
|
execute_line_if_not_dry_run("gem build #{@spec_file}")
|
225
229
|
gem = find_current_gem_file
|
226
230
|
execute_line_if_not_dry_run("gem install #{gem}")
|
227
|
-
|
228
|
-
execute_line_if_not_dry_run(
|
231
|
+
|
232
|
+
execute_line_if_not_dry_run("sed -i \"\" \"s/#{bumped_version}/#{result}/\" README.md")
|
233
|
+
execute_line_if_not_dry_run("sed -i \"\" \"s/#{bumped_version}/#{result}/\" #{version_file}")
|
234
|
+
execute_line_if_not_dry_run("rm #{gem}")
|
229
235
|
else
|
230
236
|
raise 'Unknown spec type'
|
231
237
|
end
|
@@ -233,9 +239,14 @@ module BumperPusher
|
|
233
239
|
|
234
240
|
|
235
241
|
if @options[:changelog]
|
236
|
-
|
237
|
-
|
238
|
-
|
242
|
+
if `which github_changelog_generator`.empty?
|
243
|
+
puts 'Cancelled bumping: no github_changelog_generator gem found'
|
244
|
+
else
|
245
|
+
execute_line_if_not_dry_run('github_changelog_generator')
|
246
|
+
execute_line_if_not_dry_run("git commit CHANGELOG.md -m \"Update changelog for version #{bumped_version}\"")
|
247
|
+
execute_line_if_not_dry_run('git push')
|
248
|
+
end
|
249
|
+
|
239
250
|
end
|
240
251
|
|
241
252
|
end
|
data/lib/bumper_pusher.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bumper_pusher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Petr Korolev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|