55 Commits

Author SHA1 Message Date
Mike McQuaid
b914411ac8
Delete Bintray code
Remove all code related to Bintray. It no longer works so there's no
point keeping it around.

Some of this could arguably be deprecated/disabled first/instead but:
I'm not sure I see the sense in keeping stuff around that's known to be
broken.
2021-05-12 13:37:18 +01:00
Mike McQuaid
08926fb1ec
dev-cmd: run Homebrew.install_bundler_gems! earlier.
Run `Homebrew.install_bundler_gems!` a bit earlier for some developer
commands to avoid printing gem installation output in the middle of
normal developer command output.
2021-04-30 12:00:28 +01:00
Chris Wegrzyn
68852c9162 Style fix 2021-04-29 12:51:15 -04:00
Chris Wegrzyn
ee8dc058d8 Better help text 2021-04-29 12:37:22 -04:00
Chris Wegrzyn
ffbabfd238 Rename download-strategy to root-url-using 2021-04-29 12:37:20 -04:00
Chris Wegrzyn
3f60c95425 --download-strategy instead of --root-url-spec 2021-04-29 12:35:48 -04:00
Chris Wegrzyn
4025dce097 Support adding root_url specs in bottle output 2021-04-29 12:34:03 -04:00
Mike McQuaid
d44d686cd5
dev-cmd: avoid uploading identical bottles.
If the `rebuild`, `root_url`, `cellar` and checksums are all identical
between an old and new bottle block: we don't need a new bottle at
all. Handle this by deleting the relevant files with
`brew bottle --merge --write` and gracefully notifying the caller of
`brew pr-upload`.

This should avoid e.g.
39340a11ea
occurring in future.
2021-04-29 14:48:45 +01:00
Mike McQuaid
dd201a219c
dev-cmd: add more --verbose bottle, pr-upload output.
This should make it easier to debug `all:` bottle upload failures.

While we're here, remove the weird `_` that ended up at the end of a
method name.
2021-04-28 12:48:24 +01:00
Mike McQuaid
5b858ee783
dev-cmd/pr-upload: fix json_files handling.
Another failure:
https://github.com/Homebrew/homebrew-core/pull/75299#issuecomment-825654120
2021-04-23 14:35:26 +01:00
Mike McQuaid
1c7fe79968
dev-cmd/pr-upload: fix bad args reference.
Currently breaking CI.
2021-04-23 13:53:43 +01:00
Mike McQuaid
521d6b51a6
dev-cmd/{bottle,pr-upload}: generate, upload all: $SHA256 bottles.
Generate `all: $SHA256` bottles if:
- all generated bottles have the same cellar
- all generated bottles have the same checksum

In this case, on `brew bottle --merge --write`: delete all the non-`all`
bottles (and their JSON) and upload only the single one that's
necessary.
2021-04-21 17:10:05 +01:00
Bo Anderson
1feed79e69
Use File.read over IO.read 2021-04-14 12:42:26 +01:00
Mike McQuaid
1bdb8c7a33
More Bintray cleanup
Cleanup more files and names related to Bintray to ease their future
deletion (when Bintray is shutdown).
2021-04-12 15:07:46 +01:00
Bo Anderson
57e4209e9c
github_packages: support --keep-old 2021-04-09 17:55:12 +01:00
Mike McQuaid
b0ba92466f
github_packages: fix more bulk upload errors.
- replace `+` in formula names (because it's an invalid character)
- do a `skopeo inspect` first to avoid overwriting existing packages
2021-04-07 12:48:34 +01:00
Dawid Dziurla
82b71b7a02
pr-pull,upload: don't quote passed --committer value 2021-04-02 00:17:43 +02:00
nandahkrishna
53a7065bcc
Allow specifying committer for some dev-cmds 2021-04-01 22:22:31 +05:30
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 Jackman
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
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
Mike McQuaid
3f00d08544
dev-cmd/pr-upload: some refactoring
- make the description more generic/correct
- use "internet archive" over "archive"
- move some logic to a new `GitHubReleases` class (for consistency)
- remove some obvious comments
- extract out and move some constants
2021-03-11 14:49:56 +00:00
Shaun Jackman
c4787a0a8b
pr-upload: Fix a typo affecting Internet Archive 2021-02-24 15:06:06 -08:00
Shaun Jackman
641f134274
Apply Mike's suggestions 2021-02-23 11:31:43 -08:00
Shaun Jackman
b0bd15fb41
pr-upload: Upload bottles to Archive.org
--archive-item specifies the item identifier.
HOMEBREW_ARCHIVE_KEY=access:secret specifies the S3 key.
2021-02-22 17:21:43 -08:00
nandahkrishna
56e0c3d9e8
Update GitHub API usage 2021-02-15 22:38:27 +05:30
EricFromCanada
cd3cb6928b indent suggested commands on subsequent line
and combine sequential puts calls
2021-01-26 15:36:44 -05:00
Rylan Polster
d1f3e39b7b
Update commands to generate usage banner 2021-01-18 21:20:11 -05:00
Rylan Polster
da811373d3 Add named_args DSL for commands 2021-01-13 17:09:42 -05:00
Dawid Dziurla
d91e5358cb
pr-upload: tighten json_files glob 2020-12-12 22:59:28 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
Dawid Dziurla
939f22c268
pr-upload: audit only changed formulae 2020-11-12 20:04:20 +01:00
Mike McQuaid
e62090a4f4
dev-cmd/pr-upload: fix brew audit arguments.
I accidentally committed an earlier version for this.
2020-11-09 13:49:40 +00:00
Mike McQuaid
9057a63021
dev-cmd/pr-upload: run brew audit before uploading.
Check that `brew bottle --merge --write` hasn't broken `brew audit`.
2020-11-09 09:59:59 +00:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Rylan Polster
1fe9370b38 pr-upload: add --no-commit flag 2020-10-03 12:36:46 -04:00
Dawid Dziurla
311e5f35f8
pr-upload: fix getting existing github release 2020-09-16 00:18:41 +02:00
Dawid Dziurla
f6601cee10
Support bottle uploads to GitHub Releases
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-09-12 13:03:39 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Dawid Dziurla
6fe56c33ff
pr-upload: use PkgVersion.parse instead of Version.new 2020-07-29 11:17:50 +02:00
Dawid Dziurla
3ee158bf16
pr-upload: fix formula version 2020-07-29 09:22:09 +02:00
Seeker
69ca7c5cd7 pr-upload: fix for non-homebrew-core taps 2020-07-27 13:13:56 -07:00
Jonathan Chang
80b62d8c2c pr-upload: style tweaks
Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-07-27 23:55:45 +10:00
Jonathan Chang
ebfd308241 pr-upload: ensure bottle and formula version match 2020-07-27 23:55:45 +10:00
Markus Reiter
bf13db3367 Make Parser#parse return args. 2020-07-25 02:37:10 +02:00
Markus Reiter
adc36a05ff Refactor Bintray not to depend on args. 2020-07-25 02:37:10 +02:00
Dawid Dziurla
8a1ff9275c
dev-cmd/pr-upload: add --keep-old flag 2020-07-06 17:41:07 +02:00
Jonathan Chang
204e56d01e pr-pull, pr-upload: add --warn-on-upload-failure 2020-07-02 00:11:55 +10:00
Jonathan Chang
21c903c133 pr-pull, pr-upload: use safe_system to call brew 2020-07-01 23:59:07 +10:00