Skip to content

Commit 37ecc3d

Browse files
committed
Trim BottleImage doc comment and rejoin the brew docs list
1 parent f4423ab commit 37ecc3d

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

‎docs/configuration.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,6 @@ proxy mirror --platform linux/arm64 pkg:brew/hello@2.12.3 pkg:brew/openssl%403
16741674
```
16751675

16761676
- A formula name with `@` is written with `%40`, since `@` starts the version: `pkg:brew/openssl%403` is `openssl@3`, and `pkg:brew/openssl@3` is version 3 of `openssl`.
1677-
16781677
- The formula's JSON API on `upstream.homebrew_api` gives the image tag for the current version, which carries the formula's revision and the bottles' rebuild (`hello` 2.12.3 is tagged `2.12.3-1`). Only the current version is described there; another version is used as the tag as given, so give the full tag, such as `2.12.2` or `2.12.3-1`, for older bottles.
16791678
- A PURL without a version mirrors the current version.
16801679
- `--platform` selects bottles like image platforms: `linux/arm64`, `linux/amd64`, or `darwin/arm64` for every macOS release's arm64 bottle. Without it every bottle of the version is mirrored.

‎internal/handler/homebrew_bottles.go‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,9 @@ type homebrewFormula struct {
3535
} `json:"bottle"`
3636
}
3737

38-
// BottleImage returns the image Homebrew publishes the bottles of a
39-
// homebrew/core formula version under, as brew pulls them through
40-
// HOMEBREW_ARTIFACT_DOMAIN: openssl@3 is homebrew/core/openssl/3, and the tag
41-
// carries the formula's revision and the bottles' rebuild, so hello 2.12.3
42-
// with rebuild 1 is tagged 2.12.3-1. Only the current version is described by
43-
// the JSON API; any other version is used as the tag as given, which also
44-
// takes a tag such as 2.12.3-1 directly.
38+
// BottleImage returns the homebrew/core image and tag for a formula version.
39+
// Only the current version gets its revision and rebuild from the JSON API;
40+
// any other version is used as the tag as given.
4541
func (h *HomebrewHandler) BottleImage(ctx context.Context, formula, version string) (ImageRef, error) {
4642
if !homebrewFormulaPattern.MatchString(formula) {
4743
return ImageRef{}, fmt.Errorf("invalid Homebrew formula name %q", formula)

0 commit comments

Comments
 (0)