aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2013-09-21 21:24:50 +0100
committerMike McQuaid2013-09-22 16:16:50 +0100
commit5d0f868f060c086cc53c81ef6a63ac93e24ae1b4 (patch)
tree037857904190f1d5f31f0f8570954ff961ecb62a /Library/Homebrew
parentb2a983343b94d67c740fb273d14d68702ddc765b (diff)
downloadbrew-5d0f868f060c086cc53c81ef6a63ac93e24ae1b4.tar.bz2
Move bottle.rb logic from test-bot to brew bottle.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/bottles.rb5
-rw-r--r--Library/Homebrew/cmd/bottle.rb7
2 files changed, 7 insertions, 5 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb
index 5736aeea3..ff12cc689 100644
--- a/Library/Homebrew/bottles.rb
+++ b/Library/Homebrew/bottles.rb
@@ -50,11 +50,6 @@ def bottle_file_outdated? f, file
bottle_ext && bottle_url_ext && bottle_ext != bottle_url_ext
end
-def bottle_new_revision f
- return 0 unless bottle_current? f
- f.bottle.revision + 1
-end
-
def bottle_native_suffix revision=nil
".#{bottle_tag}#{bottle_suffix(revision)}"
end
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 9c7157d8e..c6d074750 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -114,6 +114,13 @@ module Homebrew extend self
output = bottle_output bottle
puts output
end
+
+ if ARGV.include? '--rb'
+ bottle_base = filename.gsub(bottle_suffix(bottle_revision), '')
+ File.open "#{bottle_base}.bottle.rb", 'w' do |file|
+ file.write output
+ end
+ end
end
def merge