diff --git a/Library/Homebrew/dev-cmd/pr-upload.rb b/Library/Homebrew/dev-cmd/pr-upload.rb index 94e79e3efeecebb3b118b43c17787a6fd1161e88..67186565cdeee0e3737a67222852c812b30bb742 100644 --- a/Library/Homebrew/dev-cmd/pr-upload.rb +++ b/Library/Homebrew/dev-cmd/pr-upload.rb @@ -20,6 +20,8 @@ module Homebrew "attempt to preserve its value in the generated DSL." switch "-n", "--dry-run", description: "Print what would be done rather than doing it." + switch "--no-commit", + description: "Do not generate a new commit before uploading." switch "--warn-on-upload-failure", description: "Warn instead of raising an error if the bottle upload fails. "\ "Useful for repairing bottle uploads that previously failed." @@ -66,6 +68,7 @@ module Homebrew bottle_args << "--debug" if args.debug? bottle_args << "--keep-old" if args.keep_old? bottle_args << "--root-url=#{args.root_url}" if args.root_url + bottle_args << "--no-commit" if args.no_commit? bottle_args += json_files if args.dry_run? diff --git a/docs/Common-Issues-for-Core-Contributors.md b/docs/Common-Issues-for-Core-Contributors.md index bf88e8126a3a84c6c6cc04ee19613c3f5a794348..c7d8dba25c92555ad488a106b63650aaaeb9597f 100644 --- a/docs/Common-Issues-for-Core-Contributors.md +++ b/docs/Common-Issues-for-Core-Contributors.md @@ -9,6 +9,10 @@ This is a page for maintainers to diagnose certain build errors. ### Bottle publishes failed but the commits are correct in the git history Follow these steps to fix this issue: +* Download and extract the bottle artifact. +* `brew pr-upload --no-commit` in the bottle directory. + +Alternative instructions using `pr-pull`: * `git reset --hard <SHA>` in homebrew/core to reset to the commit before before all the commits created by `brew pr-pull`. * `brew pr-pull <options>` to upload the right bottles. Add the `--warn-on-upload-failure` flag if the bottles have been partially uploaded and you're certain that the bottle checksums will match the checksums already present in the `bottle do` block of the formula. * `git reset --hard origin/master` to return to the latest commit and discard the commits made by `brew pr-pull`. diff --git a/docs/Manpage.md b/docs/Manpage.md index eed8ecd33d498be4bb1f6c95a35a1027f9124445..d9961871cd964c76b25fa774e50e786427eacb13 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1177,6 +1177,8 @@ Apply the bottle commit and publish bottles to Bintray or GitHub Releases. If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL. * `-n`, `--dry-run`: Print what would be done rather than doing it. +* `--no-commit`: + Do not generate a new commit before uploading. * `--warn-on-upload-failure`: Warn instead of raising an error if the bottle upload fails. Useful for repairing bottle uploads that previously failed. * `--bintray-org`: diff --git a/manpages/brew.1 b/manpages/brew.1 index 5fa5423e191c0230f09f1516840b485c9b41f5da..64401828158de7cd73789819796112ec63955f19 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1674,6 +1674,10 @@ If the formula specifies a rebuild version, attempt to preserve its value in the Print what would be done rather than doing it\. . .TP +\fB\-\-no\-commit\fR +Do not generate a new commit before uploading\. +. +.TP \fB\-\-warn\-on\-upload\-failure\fR Warn instead of raising an error if the bottle upload fails\. Useful for repairing bottle uploads that previously failed\. .