From 360af367a816fa2f7b736a270decdd0626f02f22 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 9 Feb 2013 19:06:54 -0800 Subject: Cleanup bottle DSL. * Remove legacy url syntax. * Use revision instead of version. Signed-off-by: Mike McQuaid --- Library/Homebrew/cmd/bottle.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Library/Homebrew/cmd') 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 -- cgit v1.2.3