Add full version and build numbers to user agent
Signed-off-by: Max Howell <max@methylblue.com> I adapted it slightly based on the user agent that Safari gives.
This commit is contained in:
parent
ad01b141b7
commit
4ed3834be0
@ -33,9 +33,7 @@ require 'hardware'
|
|||||||
# build systems we support to do it.
|
# build systems we support to do it.
|
||||||
|
|
||||||
|
|
||||||
`/usr/bin/sw_vers -productVersion` =~ /(10\.\d+)(\.\d+)?/
|
ENV['MACOSX_DEPLOYMENT_TARGET']=MACOS_VERSION.to_s
|
||||||
MACOS_VERSION=$1.to_f
|
|
||||||
ENV['MACOSX_DEPLOYMENT_TARGET']=$1
|
|
||||||
|
|
||||||
# ignore existing build vars, thus we should have less bugs to deal with
|
# ignore existing build vars, thus we should have less bugs to deal with
|
||||||
ENV['LDFLAGS']=""
|
ENV['LDFLAGS']=""
|
||||||
|
|||||||
@ -34,8 +34,12 @@ else
|
|||||||
HOMEBREW_CACHE=Pathname.new("~/Library/Caches/Homebrew").expand_path
|
HOMEBREW_CACHE=Pathname.new("~/Library/Caches/Homebrew").expand_path
|
||||||
end
|
end
|
||||||
|
|
||||||
HOMEBREW_PREFIX=(Pathname.getwd+__FILE__).dirname.parent.parent.cleanpath
|
HOMEBREW_PREFIX = (Pathname.getwd+__FILE__).dirname.parent.parent.cleanpath
|
||||||
HOMEBREW_CELLAR=HOMEBREW_PREFIX+'Cellar'
|
HOMEBREW_CELLAR = HOMEBREW_PREFIX+'Cellar'
|
||||||
HOMEBREW_VERSION='0.4'
|
HOMEBREW_VERSION = 0.4
|
||||||
HOMEBREW_WWW='http://bit.ly/Homebrew'
|
HOMEBREW_WWW = 'http://bit.ly/Homebrew'
|
||||||
HOMEBREW_USER_AGENT="Homebrew #{HOMEBREW_VERSION} (Ruby #{VERSION}; Mac OS X 10.5 Leopard)"
|
|
||||||
|
MACOS_FULL_VERSION = `/usr/bin/sw_vers -productVersion`.chomp
|
||||||
|
MACOS_VERSION = /(10\.\d+)(\.\d+)?/.match(MACOS_FULL_VERSION).captures.first.to_f
|
||||||
|
|
||||||
|
HOMEBREW_USER_AGENT = "Homebrew #{HOMEBREW_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; Mac OS X #{MACOS_FULL_VERSION})"
|
||||||
|
|||||||
2
bin/brew
2
bin/brew
@ -81,7 +81,7 @@ begin
|
|||||||
|
|
||||||
if ARGV.verbose?
|
if ARGV.verbose?
|
||||||
ohai "Build Environment"
|
ohai "Build Environment"
|
||||||
%w[CFLAGS LDFLAGS CPPFLAGS MAKEFLAGS CC CXX].each do |f|
|
%w[CFLAGS LDFLAGS CPPFLAGS MAKEFLAGS CC CXX MACOSX_DEPLOYMENT_TARGET].each do |f|
|
||||||
puts "#{f}: #{ENV[f]}" unless ENV[f].to_s.empty?
|
puts "#{f}: #{ENV[f]}" unless ENV[f].to_s.empty?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user