cmd/cache: add --bottle-tag flag
This commit is contained in:
parent
b9fc4e36f0
commit
794510f4e0
@ -24,6 +24,8 @@ module Homebrew
|
|||||||
description: "Show the cache file used when building from source."
|
description: "Show the cache file used when building from source."
|
||||||
switch "--force-bottle",
|
switch "--force-bottle",
|
||||||
description: "Show the cache file used when pouring a bottle."
|
description: "Show the cache file used when pouring a bottle."
|
||||||
|
flag "--bottle-tag",
|
||||||
|
description: "Show the cache file used when pouring a bottle for the given tag."
|
||||||
switch "--HEAD",
|
switch "--HEAD",
|
||||||
description: "Show the cache file used when building from HEAD."
|
description: "Show the cache file used when building from HEAD."
|
||||||
switch "--formula",
|
switch "--formula",
|
||||||
@ -31,7 +33,7 @@ module Homebrew
|
|||||||
switch "--cask",
|
switch "--cask",
|
||||||
description: "Only show cache files for casks."
|
description: "Only show cache files for casks."
|
||||||
|
|
||||||
conflicts "--build-from-source", "--force-bottle", "--HEAD", "--cask"
|
conflicts "--build-from-source", "--force-bottle", "--bottle-tag", "--HEAD", "--cask"
|
||||||
conflicts "--formula", "--cask"
|
conflicts "--formula", "--cask"
|
||||||
|
|
||||||
named_args [:formula, :cask]
|
named_args [:formula, :cask]
|
||||||
@ -61,7 +63,7 @@ module Homebrew
|
|||||||
sig { params(formula: Formula, args: CLI::Args).void }
|
sig { params(formula: Formula, args: CLI::Args).void }
|
||||||
def print_formula_cache(formula, args:)
|
def print_formula_cache(formula, args:)
|
||||||
if fetch_bottle?(formula, args: args)
|
if fetch_bottle?(formula, args: args)
|
||||||
puts formula.bottle.cached_download
|
puts formula.bottle_for_tag(args.bottle_tag).cached_download
|
||||||
elsif args.HEAD?
|
elsif args.HEAD?
|
||||||
puts formula.head.cached_download
|
puts formula.head.cached_download
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user