diff options
| author | Mike McQuaid | 2017-11-17 19:53:38 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2017-11-17 21:35:49 +0000 |
| commit | cd0db51343ff7c5a35173594725978c81c36c0fc (patch) | |
| tree | 760fd5cb41f0b85d06b7257792a42ff1a6efa826 /Library/Homebrew/os | |
| parent | 889fc8190603dc277ed5f5beee94e667e81e64f8 (diff) | |
| download | brew-cd0db51343ff7c5a35173594725978c81c36c0fc.tar.bz2 | |
diagnostic: check if Xcode needs CLT installed.
Require the CLT on all but the latest version of macOS to avoid the
continuous workarounds for SDK weirdness.
Diffstat (limited to 'Library/Homebrew/os')
| -rw-r--r-- | Library/Homebrew/os/mac.rb | 17 | ||||
| -rw-r--r-- | Library/Homebrew/os/mac/xcode.rb | 9 |
2 files changed, 22 insertions, 4 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 9215e3c96..ade801c42 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -31,16 +31,25 @@ module OS @version = nil end - def prerelease? - # TODO: bump version when new OS is released - version >= "10.14" + def latest_sdk_version + # TODO: bump version when new Xcode macOS SDK is released + Version.new "10.13" + end + + def latest_stable_version + # TODO: bump version when new macOS is released + Version.new "10.13" end def outdated_release? - # TODO: bump version when new OS is released + # TODO: bump version when new macOS is released version < "10.11" end + def prerelease? + version > latest_stable_version + end + def cat version.to_sym end diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 96be56e3b..ae725d948 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -40,6 +40,15 @@ module OS version < minimum_version end + def latest_sdk_version? + OS::Mac.version == OS::Mac.latest_sdk_version + end + + def needs_clt_installed? + return false if latest_sdk_version? + without_clt? + end + def outdated? return false unless installed? version < latest_version |
