bumperok 0.0.4 → 0.0.5
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/bumper.rb +16 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 228769945ea6cb431bb0315cc706d4278a924523
|
4
|
+
data.tar.gz: e525e97fc5556f3c4e9fae63e290af5837a8022a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 088da4e585d4f6b64342db0a86b2e8a8584bfddeb4c66462ac8c4f01e9720a4f31c4073c37dc5bd7326311596da37a9d794f48cee5a148e5565b2d018ab1d84f
|
7
|
+
data.tar.gz: d4941c3cc17e5d6e615dd3dab87acd4b9330116a55a3704e91131fd1b54231aedf71b7979fa1557b8eea3d31e28b556d3695c50b90270459dd7f82010e559488
|
data/lib/bumper.rb
CHANGED
@@ -4,13 +4,13 @@ require 'git-ssh-wrapper'
|
|
4
4
|
require 'jenkins_api_client'
|
5
5
|
|
6
6
|
class Bumper
|
7
|
-
VERSION = "0.0.
|
7
|
+
VERSION = "0.0.5"
|
8
8
|
|
9
9
|
def self.tag git_path, tag_name
|
10
10
|
wrapper = GitSSHWrapper.with_wrapper(private_key_path: '~/.ssh/bumber_at_sibext', log_level: 'ERROR') do |w|
|
11
11
|
w.set_env
|
12
|
-
|
13
|
-
|
12
|
+
`#{git(git_path)} tag '-f' '#{tag_name}' '-m tagged by Bumber'` # 2>&1
|
13
|
+
`#{git(git_path)} push '--force' 'origin' 'refs/tags/#{tag_name}'`
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -25,16 +25,22 @@ class Bumper
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def self.submodule_update_version display, name, git
|
28
|
+
project_path = 'git_with_submodule'
|
28
29
|
wrapper = GitSSHWrapper.with_wrapper(private_key_path: '~/.ssh/bumber_at_sibext', log_level: 'ERROR') do |w|
|
29
30
|
w.set_env
|
30
|
-
`rm -Rf
|
31
|
-
`git clone --recursive #{git}
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
31
|
+
`rm -Rf #{project_path}`
|
32
|
+
`git clone --recursive #{git} #{project_path}`
|
33
|
+
`#{git(project_path)} submodule update --remote #{name}`
|
34
|
+
`#{git(project_path)} checkout -b UpdateFrom#{display}`
|
35
|
+
`#{git(project_path)} commit -am'New updates from #{display}'`
|
36
|
+
`#{git(project_path)} push --force origin UpdateFrom#{display}`
|
37
|
+
`#{git(project_path)} branch -D UpdateFrom#{display}`
|
37
38
|
end
|
38
39
|
|
39
40
|
end
|
41
|
+
|
42
|
+
def self.git git_path
|
43
|
+
"git '--git-dir=#{git_path}/.git' '--work-tree=#{git_path}'"
|
44
|
+
end
|
45
|
+
|
40
46
|
end
|