Commit Graph
13 Commits
Author SHA1 Message Date
Mike McQuaid d8a2cf9efc Write tabs to bottle JSON, optionally not bottle
- Write a subset of the tab required for bottles as an annotation.
- Add option on new bottle creation to skip writing tab into bottle
  and instead add it (and other useful metadata) to bottle JSON.
- Read formula information and tab from bottle JSON.
- Write prettier JSON to disk.
- Don't write `HEAD` to tab; this duplicates `HOMEBREW_VERSION`.
- Allow `brew bottle` to use `--json` to generate JSON files from a
  local bottle file.
2021-03-31 09:43:37 +01:00
Mike McQuaid d36e99c17c GitHub Packages tweaks
- cleanup comments from #10938
- fix download URL
- remove incorrect comment
2021-03-30 08:42:15 +01:00
Shaun JackmanandMike McQuaid c193cb9848 github_packages: Add annotations to image index
When `brew pr-upload` is run with `--dry-run`, write the OCI directory,
but do not upload it.
2021-03-29 17:11:38 +01:00
Shaun JackmanandMike McQuaid a631377fd2 pr-upload: Fix GitHub Packages for Linux
Fix GitHub Packages for Linux and third-party taps.

- Copy all architecture images using `skopeo copy --all`
2021-03-29 17:11:21 +01:00
Mike McQuaid 7f1ac4cdae github_packages: tweak package name and output URL 2021-03-29 15:10:43 +01:00
Mike McQuaid 725f2828b4 github_packages: add mediaType comment. 2021-03-29 14:48:59 +01:00
Mike McQuaid 490ffb70de github_packages: import fixes from #10947 2021-03-29 14:48:58 +01:00
Mike McQuaid 5f31ebd8d4 github_packages: use json_schemer gem.
Instead of the deprecated json-schema.
2021-03-29 14:48:58 +01:00
Mike McQuaid 169a1bae13 github_packages: various improvements.
- validate all JSON files against their JSON schemas
- remove existing/lingering JSON files
- improve naming based on schema understanding
- add more (empty) annotations hashes where valid
- output prettier JSON
- fix non-SHA256 output filenames
2021-03-25 10:29:26 +00:00
Mike McQuaid 74f31af8d4 github_packages: use skopeo.
`skopeo` allows replacing `docker` and `oras` with a single tool that
behaves in a way that's a little more intuitive for us (we build the
directory structure on disk and upload that). It seems to be better at
preserving our metadata, too.

Take the opportunity for writing out more metadata ourselves to split
out more logic into separate functions.

While we're here, fix the `download_strategy` timeout handling for
GitHub Packages.
2021-03-19 21:09:18 +00:00
Mike McQuaid 0f87bf38d7 github_packages: improve metadata.
- add more metadata to the images on upload
- stitch together images using Docker's CLI
- more code cleanup
2021-03-18 12:58:15 +00:00
Mike McQuaid 7fc52d2065 github_packages: fix HOMEBREW_BOTTLE_DOMAIN usage.
This still worked but ended up always having a `/bottles-*/` part of the
URL that was unnecessary when using `HOMEBREW_BOTTLE_DOMAIN`.
2021-03-16 15:17:42 +00:00
Mike McQuaid 8e646f6202 pr-upload: support uploading to GitHub Packages.
Use `oras` to create a package tagged with the current version.
2021-03-12 14:09:25 +00:00