35 Commits

Author SHA1 Message Date
Nanda H Krishna
2325184dd0
bintray: fix filename
Co-authored-by: Bo Anderson <mail@boanderson.me>
2021-04-10 01:30:56 +05:30
Nanda H Krishna
fca71c28ae
bintray: fix filename for bottle uploads 2021-04-10 01:27:09 +05:30
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
Seeker
fbafaff4fe rubocop: require braces for Sorbet sig 2021-01-18 16:52:45 -08:00
Mike McQuaid
9216d8abe6
rubocop-rails: make fixes. 2020-12-02 10:43:04 +00:00
Jonathan Chang
6b06716757 bintray: add type signatures 2020-11-27 17:44:46 +11:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
dddfbf80fc apidoc: add/update yard tags 2020-11-06 00:16:35 -05:00
Jonathan Chang
268cb87d5e bintray: warn on upload error on uploads
Previously this would only warn on errors for certain Bintray API
requests like publishing. This should now also warn on error for curl
POST uploads (if the appropriate flag has been passed).
2020-10-23 01:04:57 +11:00
Markus Reiter
bf7fe45e89
Merge pull request #8896 from reitermarkus/sorbet-inline
Inline type annotations.
2020-10-13 10:40:53 +02:00
Jonathan Chang
622e76e7f3 bintray: check remote file hash prior to upload
If the remote file is published and has a hash matching the file we're
about to upload, just skip uploading and publishing it entirely, rather
than bailing out with an error.
2020-10-12 23:53:21 +11:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Dawid Dziurla
14741e3681
Merge pull request #8410 from dawidd6/github-releases
Support bottle uploads to GitHub Releases
2020-09-15 11:59:35 +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
Dawid Dziurla
36c35efcd8
bintray: don't output raw JSON 2020-09-09 18:01:47 +02:00
Markus Reiter
45e3d58e96 Document Bintray. 2020-08-26 03:13:58 +02:00
Markus Reiter
490e503b1b Replace Homebrew.args with Context. 2020-08-06 16:13:14 +02:00
Markus Reiter
2dce2ace2c Pass args.verbose? to Bintray. 2020-08-06 16:12:52 +02:00
Issy Long
9f296aa6ac
bintray: Fix "uninitialized constant EnvConfig" errors
- This fix was suggested by Sorbet when I ran `HOMEBREW_SORBET=1 bundle
  exec srb tc` on the latest `master` while playing around with the
  latest changes post-GSoC meeting.
- Then I noticed it was actually a bug, introduced in
  adc36a05ffeadb54b94c87d86f62fba9dbb86795, found by us not being able to
  publish bottles for [this build of the `n`
  formula](https://github.com/Homebrew/homebrew-core/runs/910309641?check_suite_focus=true)
  in https://github.com/Homebrew/homebrew-core/pull/58606:

```
[master 31d32307bd] n: update 6.7.0 bottle.
 1 file changed, 3 insertions(+), 3 deletions(-)
curl: (22) The requested URL returned error: 404 Not Found
Error: uninitialized constant Bintray::EnvConfig
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/bintray.rb:28:in `open_api'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/bintray.rb:43:in `upload'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/bintray.rb:186:in `block (2 levels) in upload_bottle_json'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/bintray.rb:158:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/bintray.rb:158:in `block in upload_bottle_json'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/bintray.rb:153:in `each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/bintray.rb:153:in `upload_bottle_json'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-upload.rb:54:in `pr_upload'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:111:in `<main>'
Error: Failure while executing; `/home/linuxbrew/.linuxbrew/bin/brew pr-upload --verbose --bintray-org=homebrew` exited with 1.
```
2020-07-25 22:09:58 +01:00
Markus Reiter
adc36a05ff Refactor Bintray not to depend on args. 2020-07-25 02:37:10 +02:00
Jonathan Chang
204e56d01e pr-pull, pr-upload: add --warn-on-upload-failure 2020-07-02 00:11:55 +10:00
Jonathan Chang
bd59b66c25 bintray: fail on upload and publish curl problems 2020-07-02 00:11:12 +10:00
Jonathan Chang
17c20c0e11 pr-pull: dupe logic moved to mirror and pr-upload 2020-06-21 19:55:10 +10:00
Issy Long
2608755ac5
Merge pull request #7709 from dawidd6/auto-mirroring
bintray: automatically run brew mirror if needed
2020-06-17 20:09:30 +01:00
Dawid Dziurla
3b0359706f
bintray: automatically run brew mirror if needed 2020-06-13 12:55:03 +02:00
Jonathan Chang
f428214d13
bintray: clarify conditions
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-06-10 18:06:56 +10:00
Jonathan Chang
b57297d253 bintray: stricter checking of upload results
Parse the JSON output of the upload and publish steps to ensure that
a "success" message is always seen on upload, and that the number of
files published is the same as the number of files we wanted to publish
as based on the bottle JSON description.
2020-06-10 17:52:04 +10:00
Bo Anderson
65d7036c19 bintray: url encode where needed 2020-05-10 01:48:29 +01:00
Alexander Bayandin
a34e0c1893 bintray: discard unused output from curl 2020-04-27 20:25:11 +01:00
Alexander Bayandin
1d7ed982ec bintray: force curl to fail on server errors 2020-04-26 10:03:32 +01:00
Alexander Bayandin
28def587f0 bintray: fix style 2020-04-22 22:42:26 +01:00
Alexander Bayandin
bd24f5a45e bintray: fix package creation 2020-04-21 14:36:01 +01:00
Jonathan Chang
1147106134 bintray: only clear Bintray key
Also add debugging statements
2020-03-31 22:11:06 +11:00
Jonathan Chang
e601c3f87c bintray: streamline initialization
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-03-30 22:41:17 +11:00
Jonathan Chang
49c5a4393a bintray: add Bintray API functions 2020-03-30 22:18:19 +11:00