build-buddy 1.14.0 → 1.14.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/build_buddy.rb +1 -1
- data/lib/build_buddy/build_data.rb +0 -7
- data/lib/build_buddy/builder.rb +3 -5
- 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: 6ba4c0fb810c99f9f83160fed087cfe0265d4894
|
4
|
+
data.tar.gz: d4beedca033f53d2867182aeeecad3a67c9f409c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 691ce8fe310f1aae0719b7cf4a56effb99b14078948f4fed733b7436c5250a8293f16e58737796d739c8e4f47df10732b0b38dadccd3d057757e3f65c14498a9
|
7
|
+
data.tar.gz: a214d15ceea592f4bf8d632b63c593532e24b3d2b40abb3b127ce982e448e45213f6013d3312cb159eb1be216637997c625ebed6d56d97e18008fcd9abaac2de
|
data/lib/build_buddy.rb
CHANGED
@@ -54,8 +54,6 @@ module BuildBuddy
|
|
54
54
|
def to_h
|
55
55
|
hash = {}
|
56
56
|
instance_variables.each {|var| hash[var.to_s.delete("@")] = instance_variable_get(var) }
|
57
|
-
# Remove the bb_id field as it's only meaningful while the build-buddy is running
|
58
|
-
hash.delete(:bb_id)
|
59
57
|
hash
|
60
58
|
end
|
61
59
|
|
@@ -82,10 +80,5 @@ module BuildBuddy
|
|
82
80
|
def pull_request_uri
|
83
81
|
"https://github.com/#{@repo_full_name}/pull/#{@pull_request}"
|
84
82
|
end
|
85
|
-
|
86
|
-
def log_file_name
|
87
|
-
return nil if @start_time.nil?
|
88
|
-
File.join(Config.build_output_dir, "#{@start_time.strftime('%Y%m%d-%H%M%S')}.log")
|
89
|
-
end
|
90
83
|
end
|
91
84
|
end
|
data/lib/build_buddy/builder.rb
CHANGED
@@ -159,10 +159,6 @@ source ${BB_BUILD_SCRIPT}
|
|
159
159
|
@watcher.async.watch_pid
|
160
160
|
end
|
161
161
|
|
162
|
-
def self.get_log_file_name(build_data)
|
163
|
-
File.join(Config.build_output_dir, build_data._id.to_s, "log.txt")
|
164
|
-
end
|
165
|
-
|
166
162
|
def process_done(status)
|
167
163
|
@build_data.end_time = Time.now.utc
|
168
164
|
@build_data.termination_type = (status.signaled? ? :killed : :exited)
|
@@ -231,7 +227,9 @@ source ${BB_BUILD_SCRIPT}
|
|
231
227
|
@watcher = nil
|
232
228
|
|
233
229
|
# Delete older log directories
|
234
|
-
log_dir_names = Dir.entries(Config.build_output_dir)
|
230
|
+
log_dir_names = Dir.entries(Config.build_output_dir)
|
231
|
+
.select {|fn| fn.match(/[0-9a-z]{24}$/)}
|
232
|
+
.sort_by! {|fn| File.mtime(File.join(Config.build_output_dir, fn))}
|
235
233
|
while log_dir_names.count > Config.num_saved_build_outputs
|
236
234
|
dir_name = log_dir_names.shift
|
237
235
|
FileUtils.rm_rf(File.join(Config.build_output_dir, dir_name))
|