Skip to content

Commit

Permalink
Kill an existing buckd before starting a build
Browse files Browse the repository at this point in the history
Just in case the build ripples over a buck update
  • Loading branch information
shs96c committed Jun 7, 2016
1 parent db8c0aa commit 071c291
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rake-tasks/buck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Buck
def self.download
@@buck_bin ||= (
if File.exist?('.nobuckcheck') && present?('buck')
# We'll assume the user knows how to kill buck themselves
return ["buck"]
end

Expand All @@ -17,6 +18,8 @@ def self.download
out_hash = File.exist?(out) ? Digest::MD5.file(out).hexdigest : nil

if cached_hash == out_hash
# Make sure we're running a pristine buck instance
sh "python #{out} kill"
return ["python", out]
end

Expand All @@ -35,6 +38,7 @@ def self.download

ant.get('src' => url, 'dest' => out, 'verbose' => true)
File.chmod(0755, out)
sh "python #{out} kill"
["python", out]
)
end
Expand Down

0 comments on commit 071c291

Please sign in to comment.