-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
dev-cmd/generate-formula-api: add dependencies to internal API. #21042
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -69,6 +69,8 @@ def run | |||||
| File.write("_data/formula_canonical.json", "#{canonical_json}\n") unless args.dry_run? | ||||||
|
|
||||||
| OnSystem::VALID_OS_ARCH_TAGS.each do |bottle_tag| | ||||||
| macos_version = bottle_tag.to_macos_version if bottle_tag.macos? | ||||||
|
|
||||||
| aliases = {} | ||||||
| renames = {} | ||||||
| variation_formulae = all_formulae.to_h do |name, formula| | ||||||
|
|
@@ -95,11 +97,31 @@ def run | |||||
|
|
||||||
| sha256 = bottle_collector.specification_for(bottle_tag)&.checksum&.to_s | ||||||
|
|
||||||
| [name, [pkg_version.to_s, version_scheme, rebuild, sha256]] | ||||||
| dependencies = Set.new(formula["dependencies"]) | ||||||
|
|
||||||
| if macos_version | ||||||
| uses_from_macos = formula["uses_from_macos"].zip(formula["uses_from_macos_bounds"]) | ||||||
| dependencies += uses_from_macos.filter_map do |dep, bounds| | ||||||
| next if bounds.blank? | ||||||
|
|
||||||
| since = bounds[:since] | ||||||
| next if since.blank? | ||||||
|
|
||||||
| since_macos_version = MacOSVersion.from_symbol(since) | ||||||
| next if since_macos_version <= macos_version | ||||||
|
|
||||||
| dep | ||||||
| end | ||||||
| else | ||||||
| dependencies += formula["uses_from_macos"] | ||||||
| end | ||||||
MikeMcQuaid marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
|
||||||
| [name, [pkg_version.to_s, version_scheme, rebuild, sha256, dependencies.to_a]] | ||||||
|
||||||
| [name, [pkg_version.to_s, version_scheme, rebuild, sha256, dependencies.to_a]] | |
| [name, [pkg_version.to_s, version_scheme, rebuild, sha256]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fine to do in a separate PR
Uh oh!
There was an error while loading. Please reload this page.