aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorMike McQuaid2013-02-09 19:06:54 -0800
committerMike McQuaid2013-03-01 17:49:09 +0000
commit360af367a816fa2f7b736a270decdd0626f02f22 (patch)
tree360fe5d1f6c960e7c6a46079da81f3d595141323 /Library/Homebrew/cmd
parent161104cae70f3207b247331d182dc47c0b8c8a06 (diff)
downloadbrew-360af367a816fa2f7b736a270decdd0626f02f22.tar.bz2
Cleanup bottle DSL.
* Remove legacy url syntax. * Use revision instead of version. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/bottle.rb14
1 files changed, 8 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb
index 9f2c59767..87b380aa6 100644
--- a/Library/Homebrew/cmd/bottle.rb
+++ b/Library/Homebrew/cmd/bottle.rb
@@ -13,19 +13,21 @@ module Homebrew extend self
return ofail "Formula not installed with '--build-bottle': #{f.name}"
end
- directory = Pathname.pwd
- bottle_version = bottle_new_version f
- filename = bottle_filename f, bottle_version
+ bottle_revision = bottle_new_revision f
+ filename = bottle_filename f, bottle_revision
+ bottle_path = Pathname.pwd/filename
+ sha1 = nil
HOMEBREW_CELLAR.cd do
ohai "Bottling #{f.name} #{f.version}..."
# Use gzip, faster to compress than bzip2, faster to uncompress than bzip2
# or an uncompressed tarball (and more bandwidth friendly).
- safe_system 'tar', 'czf', directory/filename, "#{f.name}/#{f.version}"
+ safe_system 'tar', 'czf', bottle_path, "#{f.name}/#{f.version}"
+ sha1 = bottle_path.sha1
puts "./#{filename}"
puts "bottle do"
- puts " version #{bottle_version}" if bottle_version > 0
- puts " sha1 '#{(directory/filename).sha1}' => :#{MacOS.cat}"
+ puts " revision #{bottle_revision}" if bottle_revision > 0
+ puts " sha1 '#{sha1}' => :#{MacOS.cat}"
puts "end"
end
end