build-buddy 1.14.0 → 1.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7db95cc8816c610a427233d3082ed8209c9a65b6
4
- data.tar.gz: 235ad6277e52ad8be9747933133476562af77633
3
+ metadata.gz: 6ba4c0fb810c99f9f83160fed087cfe0265d4894
4
+ data.tar.gz: d4beedca033f53d2867182aeeecad3a67c9f409c
5
5
  SHA512:
6
- metadata.gz: af52e4b43610c3ff26c5d76c99c3b069f7ba393cb374a020e8954b75ea890447a950451f52bd96da1820b3afb0b85ca2eb17d707739ba1cec51d45f84ae63a91
7
- data.tar.gz: a82009f93b686be80f338175408dc5d03bc8374189f60985fbd44112e4adce023205733f6b5a94e0e7d03a04d3921688dd0040c0f1081590fa582ffbf04b62a5
6
+ metadata.gz: 691ce8fe310f1aae0719b7cf4a56effb99b14078948f4fed733b7436c5250a8293f16e58737796d739c8e4f47df10732b0b38dadccd3d057757e3f65c14498a9
7
+ data.tar.gz: a214d15ceea592f4bf8d632b63c593532e24b3d2b40abb3b127ce982e448e45213f6013d3312cb159eb1be216637997c625ebed6d56d97e18008fcd9abaac2de
data/lib/build_buddy.rb CHANGED
@@ -9,5 +9,5 @@ require 'build_buddy/recorder'
9
9
  require 'build_buddy/build_data'
10
10
 
11
11
  module BuildBuddy
12
- VERSION = "1.14.0"
12
+ VERSION = "1.14.1"
13
13
  end
@@ -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
@@ -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).select { |f| !f.match(/\d{8}-\d{6}\.log/).nil? }.sort()
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))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-buddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Lyon-smith