Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cask: remove os_versions #15240

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions Library/Homebrew/cask/cask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,24 +114,6 @@ def versions
.reverse
end

def os_versions
# TODO: use #to_hash_with_variations instead once all casks use on_system blocks
@os_versions ||= begin
version_os_hash = {}
actual_version = MacOS.full_version.to_s

MacOSVersions::SYMBOLS.each do |os_name, os_version|
MacOS.full_version = os_version
cask = CaskLoader.load(full_name)
version_os_hash[os_name] = cask.version if cask.version != version
end

version_os_hash
ensure
MacOS.full_version = actual_version if actual_version
end
end

def full_name
return token if tap.nil?
return token if tap.user == "Homebrew"
Expand Down Expand Up @@ -307,7 +289,6 @@ def to_h
"url_specs" => url_specs,
"appcast" => appcast,
"version" => version,
"versions" => os_versions,
"installed" => versions.last,
"outdated" => outdated?,
"sha256" => sha256,
Expand Down
2 changes: 0 additions & 2 deletions Library/Homebrew/test/support/fixtures/cask/caffeine.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"url": "https://www.example.com/cask/caffeine.zip",
"appcast": null,
"version": "1.2.3",
"versions": {
},
"installed": null,
"outdated": false,
"sha256": "67cdb8a02803ef37fdbf7e0be205863172e41a561ca446cd84f0d7ab35a99d94",
Expand Down
2 changes: 0 additions & 2 deletions Library/Homebrew/test/support/fixtures/cask/everything.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
},
"appcast": null,
"version": "1.2.3",
"versions": {
},
"installed": null,
"outdated": false,
"sha256": "c64c05bdc0be845505d6e55e69e696a7f50d40846e76155f0c85d5ff5e7bbb84",
Expand Down