Allow overriding MacOS.version.

This commit is contained in:
Markus Reiter 2017-01-20 09:00:53 +01:00
parent 35045b2934
commit d94636cde9
2 changed files with 9 additions and 0 deletions

View File

@ -142,6 +142,10 @@ module Hbc
end end
def self.process(arguments) def self.process(arguments)
unless ENV["MACOS_VERSION"].nil?
MacOS.full_version = ENV["MACOS_VERSION"]
end
command_string, *rest = *arguments command_string, *rest = *arguments
rest = process_options(rest) rest = process_options(rest)
command = Hbc.help ? "help" : lookup_command(command_string) command = Hbc.help ? "help" : lookup_command(command_string)

View File

@ -27,6 +27,11 @@ module OS
@full_version ||= Version.new((ENV["HOMEBREW_MACOS_VERSION"] || ENV["HOMEBREW_OSX_VERSION"]).chomp) @full_version ||= Version.new((ENV["HOMEBREW_MACOS_VERSION"] || ENV["HOMEBREW_OSX_VERSION"]).chomp)
end end
def full_version=(version)
@full_version = Version.new(version.chomp)
@version = nil
end
def prerelease? def prerelease?
# TODO: bump version when new OS is released # TODO: bump version when new OS is released
version >= "10.13" version >= "10.13"