bumpversion 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/lib/bumpversion.rb +6 -3
- data/lib/bumpversion/git_operation.rb +14 -3
- data/lib/bumpversion/parser_file.rb +1 -1
- data/lib/bumpversion/version.rb +1 -1
- data/spec/bumpversion_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e00666d98c0afa18d933ebfc38259c0ef63b1f856e4f237b961d9285884fd4a
|
4
|
+
data.tar.gz: aedf8c117700fa461b88b7dc7f2f0aa9148a57cf3660190ed8109b3e9622e0dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4915dc60f657dd4aae043c340a549960188c818cfa29608f3c0fe6e8e893d6aafab0efe998ca50782e2d4d49c75080a9c6d71572f1021e4643840507c225fa64
|
7
|
+
data.tar.gz: a255667ba4a67ead9f2dcbc921c31743906c9c829d695a79915872204882c8be57a4644e3f9f3f1986d5a51b1972def328a0e78c82486f9b7a7b0640891f9bd9
|
data/lib/bumpversion.rb
CHANGED
@@ -28,6 +28,7 @@ module Bumpversion
|
|
28
28
|
bump_string = BumpString.new @options
|
29
29
|
@options = bump_string.bump
|
30
30
|
PrettyOutput.sucess("Done!")
|
31
|
+
|
31
32
|
@git = GitOperation.new @options
|
32
33
|
end
|
33
34
|
|
@@ -45,9 +46,11 @@ module Bumpversion
|
|
45
46
|
Hook.pre_commit_hook @options
|
46
47
|
PrettyOutput.sucess("Done!")
|
47
48
|
|
48
|
-
|
49
|
-
|
50
|
-
|
49
|
+
if @options[:git_commit] || @options[:git_tag] || @options[:git_push]
|
50
|
+
PrettyOutput.begin("Git Operations")
|
51
|
+
@git.do!
|
52
|
+
PrettyOutput.sucess("Done!")
|
53
|
+
end
|
51
54
|
|
52
55
|
PrettyOutput.begin("Pos Commit Hooks")
|
53
56
|
Hook.pos_commit_hook @options
|
@@ -10,6 +10,7 @@ module Bumpversion
|
|
10
10
|
|
11
11
|
def commit!
|
12
12
|
if @options[:git_commit]
|
13
|
+
PrettyOutput.info("git commit")
|
13
14
|
file = @options[:file].split(',') + [@options[:config_file]]
|
14
15
|
file += @options[:git_extra_add].split(',') if @options[:git_extra_add]
|
15
16
|
@git.add(file)
|
@@ -18,12 +19,22 @@ module Bumpversion
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def tag!
|
21
|
-
|
22
|
+
if @options[:git_tag]
|
23
|
+
PrettyOutput.info("git tag")
|
24
|
+
@git.add_tag("v#{@options[:new_version]}")
|
25
|
+
end
|
22
26
|
end
|
23
27
|
|
24
28
|
def push!
|
25
|
-
|
26
|
-
|
29
|
+
if @options[:git_push]
|
30
|
+
@git.push
|
31
|
+
if @options[:git_tag]
|
32
|
+
PrettyOutput.info("git push with tags")
|
33
|
+
@git.push(@git.remote.name, @git.branch.name, :tags => true)
|
34
|
+
else
|
35
|
+
PrettyOutput.info("git push")
|
36
|
+
end
|
37
|
+
end
|
27
38
|
end
|
28
39
|
|
29
40
|
def do!
|
@@ -19,7 +19,7 @@ module Bumpversion
|
|
19
19
|
key_given_file = "#{key_given}_file"
|
20
20
|
|
21
21
|
unless options[key_given.to_sym]
|
22
|
-
options[key.to_sym] = value
|
22
|
+
options[key.to_sym] = %w[yes no].include?(value) ? { "yes" => true, "no" => false }[value] : value
|
23
23
|
options[key_given_file.to_sym] = value
|
24
24
|
end
|
25
25
|
end
|
data/lib/bumpversion/version.rb
CHANGED
data/spec/bumpversion_spec.rb
CHANGED
@@ -91,7 +91,7 @@ describe Bumpversion::Bumpversion do
|
|
91
91
|
|
92
92
|
describe 'with file' do
|
93
93
|
before do
|
94
|
-
File.write('./spec/files/bumpversion.cfg', "[bumpversion]\ncurrent-version=2.1.1\n")
|
94
|
+
File.write('./spec/files/bumpversion.cfg', "[bumpversion]\ncurrent-version=2.1.1\ngit-commit=no\n")
|
95
95
|
File.write('./spec/files/VERSION', "version=2.1.1\n")
|
96
96
|
File.write('./spec/files/VERSION_EXTRA', "version=2.1.1\n")
|
97
97
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bumpversion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dlani Mendes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: optimist
|