gerrit-seed 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gerrit_seed/gerrit.rb +12 -2
- data/lib/gerrit_seed/git.rb +2 -0
- 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: b6edec426de3cfdd0c58dd81dad495d827fc047b24f3c93b1f7fa5dbb12038d0
|
4
|
+
data.tar.gz: d05c0008a638b1d78c375c8d7a611cfcd6bde431050f46631619e2905e75feb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9ff8e38105a0adb82db32defe855c9e325e0d8380427f1c2c6335ea78e29b40779a8998e82b6452e9ef7b4671b24ae167f49c415aefba73021e88071f10ae84
|
7
|
+
data.tar.gz: 50c6064a3dafe23f6c3f9f50caab717b501e2ebbf74885eecd1fa7d0bec6711800da12ba4cc57e195943b16db450ad7bcbc1823103bc383c9541c3c5536bed60
|
data/lib/gerrit_seed/gerrit.rb
CHANGED
@@ -97,8 +97,18 @@ module GerritSeed
|
|
97
97
|
commit: parent_branch_name,
|
98
98
|
)
|
99
99
|
|
100
|
-
|
101
|
-
|
100
|
+
if change[:files]
|
101
|
+
change[:files].map do |file| File.expand_path(file, git.dir) end.each do |file|
|
102
|
+
FileUtils.mkdir_p(File.dirname(file)) unless File.exist?(File.dirname(file))
|
103
|
+
FileUtils.touch(file)
|
104
|
+
end
|
105
|
+
|
106
|
+
git.shell.("git add .")
|
107
|
+
else
|
108
|
+
git.shell.("touch #{branch_name}.in")
|
109
|
+
git.shell.("git add #{branch_name}.in")
|
110
|
+
end
|
111
|
+
|
102
112
|
git.commit(
|
103
113
|
author: author[:full_name],
|
104
114
|
email: author[:email],
|
data/lib/gerrit_seed/git.rb
CHANGED
@@ -43,8 +43,10 @@ module GerritSeed
|
|
43
43
|
def checkout(branch:, commit:)
|
44
44
|
if available_branches.include?(branch)
|
45
45
|
shell.('git', 'checkout', branch)
|
46
|
+
shell.('git clean -f -d')
|
46
47
|
else
|
47
48
|
shell.('git', 'checkout', '-b', branch, commit)
|
49
|
+
shell.('git clean -f -d')
|
48
50
|
end
|
49
51
|
end
|
50
52
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gerrit-seed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ahmad Amireh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|