raykit 0.0.435 → 0.0.437
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raykit/git/repository.rb +5 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98cf5f0bdd9cebb7f589fd780db251516e8ce5a5c949a4f78bc8657c0922aef1
|
4
|
+
data.tar.gz: 54ef2e3a238e2ea18ba3455218649397e1dff762b7398e0570df5db87aebf080
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3faa3938c63672db01a90069493479b3eb7dbf8e91bf64802314a3899edab69128d0b7f7d9c6a9860f9ed5df518246cfd09a296bb7a29091fa1cd01c45829610
|
7
|
+
data.tar.gz: 0da88c6acf36b409c5fff76a837c363ef8232ea26dd4fb3381ff235e3f2b406c42e682d6f5750f050dd5a8f441f41191c917fdaa1ae9a35fbe06c7060b88ccdc
|
@@ -147,7 +147,6 @@ module Raykit
|
|
147
147
|
def work(command)
|
148
148
|
pull if (!Dir.exist?(get_dev_dir("work")))
|
149
149
|
filename = "#{Raykit::Environment::log_dir}/work_#{relative_path.gsub("/", "-")}.json"
|
150
|
-
puts " filename #{filename}"
|
151
150
|
if (Raykit::Git::Directory.new(get_dev_dir("work")).outstanding_commit?)
|
152
151
|
puts " outstanding commit in #{get_dev_dir("work")}"
|
153
152
|
work_cmd = Raykit::Git::Repository::work(url, command)
|
@@ -156,7 +155,6 @@ module Raykit
|
|
156
155
|
else
|
157
156
|
if (File.exist?(filename))
|
158
157
|
return Raykit::Command::parse(IO.read(filename))
|
159
|
-
#work_cmd.summary(true).details_on_failure
|
160
158
|
else
|
161
159
|
work_cmd = Raykit::Git::Repository::work_url(url, command)
|
162
160
|
work_cmd.save_as(filename)
|
@@ -169,10 +167,8 @@ module Raykit
|
|
169
167
|
commit_id = "#{latest_commit(default_branch)}"
|
170
168
|
make_id = "make_#{relative_path.gsub("/", "-")}_#{commit_id}"
|
171
169
|
filename = "#{Raykit::Environment::log_dir}/#{make_id}.json"
|
172
|
-
puts " filename #{filename}"
|
173
170
|
if (File.exist?(filename))
|
174
171
|
return Raykit::Command::parse(IO.read(filename))
|
175
|
-
#make_cmd.summary(true).details_on_failure
|
176
172
|
else
|
177
173
|
make_cmd = Raykit::Git::Repository::make_url(url, commit_id, "rake default")
|
178
174
|
make_cmd.save_as(filename)
|
@@ -201,20 +197,22 @@ module Raykit
|
|
201
197
|
|
202
198
|
def self.work_url(url, cmd)
|
203
199
|
repo = Raykit::Git::Repository.new(url)
|
200
|
+
puts " work #{url} #{command}"
|
204
201
|
work_dir = repo.get_dev_dir("work")
|
205
202
|
repo.clone(work_dir) if !Dir.exist?(work_dir)
|
206
203
|
Dir.chdir(work_dir) do
|
207
204
|
run("git pull")
|
208
205
|
#run(cmd)
|
209
206
|
cmd = Raykit::Command.new(cmd)
|
210
|
-
cmd = cmd.run()
|
207
|
+
cmd = cmd.run().summary()
|
211
208
|
cmd
|
212
209
|
end
|
213
210
|
end
|
214
211
|
|
215
212
|
def self.make_url(url, commit_id, command)
|
216
213
|
repo = Raykit::Git::Repository.new(url)
|
217
|
-
|
214
|
+
puts " make #{url} #{commit_id} #{command}"
|
215
|
+
make_dir = Raykit::Environment::normalize_path(repo.get_dev_dir("make") + "/" + commit_id)
|
218
216
|
FileUtils.mkdir_p(repo.get_dev_dir("make")) if !Dir.exist?(repo.get_dev_dir("make"))
|
219
217
|
if (Dir.exist?(make_dir))
|
220
218
|
FileUtils.rm_rf(make_dir)
|
@@ -225,7 +223,7 @@ module Raykit
|
|
225
223
|
run("git reset --hard #{commit_id}")
|
226
224
|
FileUtils.rm_rf(".git")
|
227
225
|
cmd = Raykit::Command.new(command)
|
228
|
-
cmd = cmd.run()
|
226
|
+
cmd = cmd.run().summary()
|
229
227
|
end
|
230
228
|
FileUtils.rm_rf(make_dir) if (cmd.exitstatus == 0)
|
231
229
|
cmd
|