Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-cmd/pr-upload: add --keep-old flag #7920

Merged
merged 1 commit into from Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions Library/Homebrew/dev-cmd/pr-upload.rb
Expand Up @@ -15,6 +15,9 @@ def pr_upload_args
EOS
switch "--no-publish",
description: "Apply the bottle commit and upload the bottles, but don't publish them."
switch "--keep-old",
description: "If the formula specifies a rebuild version, " \
"attempt to preserve its value in the generated DSL."
switch "-n", "--dry-run",
description: "Print what would be done rather than doing it."
switch "--warn-on-upload-failure",
Expand All @@ -38,6 +41,7 @@ def pr_upload
bottle_args = ["bottle", "--merge", "--write"]
bottle_args << "--verbose" if args.verbose?
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
odie "No JSON files found in the current working directory" if Dir["*.json"].empty?
bottle_args += Dir["*.json"]
Expand Down
2 changes: 2 additions & 0 deletions docs/Manpage.md
Expand Up @@ -924,6 +924,8 @@ Apply the bottle commit and publish bottles to Bintray.

* `--no-publish`:
Apply the bottle commit and upload the bottles, but don't publish them.
* `--keep-old`:
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.
* `--warn-on-upload-failure`:
Expand Down
4 changes: 4 additions & 0 deletions manpages/brew.1
Expand Up @@ -1211,6 +1211,10 @@ Apply the bottle commit and publish bottles to Bintray\.
Apply the bottle commit and upload the bottles, but don\'t publish them\.
.
.TP
\fB\-\-keep\-old\fR
If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL\.
.
.TP
\fB\-n\fR, \fB\-\-dry\-run\fR
Print what would be done rather than doing it\.
.
Expand Down