aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/bump-formula-pr.rb
AgeCommit message (Collapse)Author
2017-12-14bump-formula-pr: use popen_read :err option.Mike McQuaid
2017-12-11bump-formula-pr: improve error messages.Mike McQuaid
- Be clearer about how URLs/tags/revisions/versions are specified in error messages. - Give a better error message if `hub` isn't configured.
2017-12-10Mentions how hub needs to be configuredLaurent Cozic
This is to address issue #3531
2017-11-21bump-formula-pr: fix for when hub isn't configuredilovezfs
2017-11-10Merge pull request #3416 from zmwangx/bump-formula-pr-fix-message1.3.7Mike McQuaid
bump-formula-pr: --message: add newlines before and after hr
2017-11-07bump-formula-pr: use HOMEBREW_BROWSER.Mike McQuaid
2017-11-07bump-formula-pr: use GitHub vars under env filter.Mike McQuaid
Ensure that the various variables are passed through and reset correctly. If we end up doing this in a bunch of places we may add some helpers to simplify this.
2017-11-03bump-formula-pr: --message: add newlines before and after hrZhiming Wang
Without an empty line before the horizontal rule (---), "Created with `brew bump-formula-pr`." is treated as a setext header. The newline before the hr is not part of the heredoc because putting it in would trip up Rubocop.
2017-10-30bump-formula-pr: add --no-browse option.Mike McQuaid
If `--no-browse` is passed, don't pass the `--browse` argument to `hub` which opens the pull request URL in a browser. Instead, output it to the command line.
2017-10-28bump-formula-pr: always use HOMEBREW_PATH.Mike McQuaid
Fixes this when using environment filtering.
2017-10-18Use “squiggly” heredocs.Markus Reiter
2017-09-25bump-formula-pr: fix duplicates checkilovezfs
`return unless pull_requests && !pull_requests.empty?` and `return unless pull_requests&.empty?` are not equivalent.
2017-09-24Rubocop: manual rule fixes.Mike McQuaid
2017-09-24Rubocop: automatic rule fixes.Mike McQuaid
2017-08-15bump-formula-pr: forward compatibility with `hub fork`Mislav Marohnić
Due to limitations of `hub fork` in hub 2.2, scripts had to repeat the command at least two times; the 2nd time was to read the fork name from the "fatal: remote MYNAME already exists" message output from git. In upcoming hub 2.3, the `hub fork` command is improved to always output the remote name, regardless of whether one already existed or not. With this approach, only one `hub fork` call will ever be necessary when hub is up to date.
2017-08-08dev-cmd/bump-formula-pr: search for tarBob W. Hogg
We first search for gtar in PATH, then check if Homebrew's gtar is available, then finally search for tar in PATH. Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
2017-06-29Strip trailing newlineMislav Marohnić
2017-06-27Fix unshallowing taps in `bump-formula-pr`Mislav Marohnić
Never try to unhshallow full clones.
2017-06-27Fix `bump-formula-pr` when working with a shallow git cloneMislav Marohnić
Creating a fork and pushing to it doesn't work when the repository in question is a shallow clone. By default, Homebrew clones all taps in shallow mode unless `--full` was passed or $HOMEBREW_DEVELOPER was set.
2017-06-12Autocorrect Rubocop Style/SpecialGlobalVars.Mike McQuaid
2017-03-01bump-formula-pr: check for version presence.ilovezfs
If it's not there, error out rather than fetching to avoid creating versionless cache files, which cause `brew cleanup` to crash.
2017-02-25Update brew's man page formatting and grammarEricFromCanada
Also update command specifications to match descriptions.
2017-02-20bump-formula-pr: improve duplicate detectionZhiming Wang
Reduce the chance of false flagging by making sure that the existing pr surfaced by GitHub.issues_for_formula actually contains the exact formula name in its title.
2017-02-12bump-formula-pr: block duplicate pull-requestsilovezfs
2017-01-09bump-formula-pr: check for URL presence.Mike McQuaid
If it's not there, produce a nicer error. Fixes #1805.
2016-12-22bump-formula-pr: fix removal of old mirrorsZhiming Wang
Previously, old mirrors are only removed if the requested spec is stable, and if the mirror lines only have two leading spaces. This leads to stale mirror line(s) when the formula a stable block like stable do url "http://example.com/v1.0.tar.gz" mirror "http://example.net/v1.0.tar.gz" end where the mirror line is lead by four spaces. In this commit, we discard the /(^ mirror .*\n)?/ pattern, and instead create a pattern with the exact url and flexible leading spaces for each mirror of the requested spec.
2016-12-06bump-formula-pr: use correct version in downloadZhiming Wang
When a --version is specified, use this specified version in the name of the downloaded file rather than the default that is parsed from the URL. For instance, brew bump-formula-pr --devel \ --url=http://www.zsh.org/pub/development/zsh-5.2-test-2.tar.gz \ --version=5.2-test-2 zsh should download to $HOMEBREW_CACHE/zsh-5.2-test-2.tar.gz (correct behavior after this commit) rather than $HOMEBREW_CACHE/zsh-2.tar.gz (wrong behavior before this commit).
2016-11-17bump-formula-pr: add --message optionZhiming Wang
For user-supplied PR message.
2016-10-02Use `module_function` for commands.Markus Reiter
2016-09-27bump-formula-pr: document new optionsilovezfs
2016-09-27bump-formula-pr: style fixesilovezfs
2016-09-27bump-formula-pr: forced_version support for develilovezfs
2016-09-27bump-formula-pr: add --write optionilovezfs
intended to be used in combination with --dry-run for a not-so-dry run the expected file modifications are made, but no git actions are taken
2016-09-27bump-formula-pr: handle gnu mirrorsilovezfs
and add explicit version when not preexisting
2016-09-27bump-formula-pr: handle explicit version DSLilovezfs
--version=1.2.3 option to set `version "1.2.3"` Note that --version=0 will remove a no-longer-needed explicit version
2016-09-27bump-formula-pr: --mirror optionilovezfs
2016-09-27bump-formula-pr: formula name guessingilovezfs
2016-09-27bump-formula-pr: set sha256 automatically when possibleilovezfs
2016-09-24RuboCop: Style/AccessorMethodNameMarkus Reiter
2016-09-11dev-cmd/bump-formula-pr: fix Rubocop warnings.Mike McQuaid
2016-09-03bump-formula-pr: audit formula before opening PRilovezfs
2016-08-20Merge pull request #760 from jasonkarns/bump-formula-pr-return-to-branchMartin Afanasjew
bump-formula-pr: return to starting branch
2016-08-19bump-formula-pr: return to starting branchJason Karns
After branching, bumping, pushing, and pr-ing; return to whatever branch was originally checked out. In most cases, I'd imagine users to want to continue receiving tap updates from master. However, after using bump-formula-pr, the tap in which the formula was bumped is left on the working branch that was doing the bumping and pull-request. After opening the PR, we should return to whatever branch the user originally had checked out – most likely master. (But git allows us to just say "previous branch" by using `-`)
2016-08-19bump-formula-pr now creates non-tracking branchesJason Karns
Without `--no-track`, some git setups may automatically set `origin/master` as the tracked upstream for the newly created branch. This upstream is what hub defaults as --head when opening PRs. By not allowing git to set `origin/master` as upstream, hub can then use the proper --head for the PR. Since hub still needs to know what --head is intended to be, we can set the branch's upstream when pushing: with the --set-upstream option. Fixes #755
2016-08-17Fix minor issues in command help text formattingMartin Afanasjew
- Inconsistent or unneeded indentation - Missing or superfluous empty lines - Missing or wrongly formatted arguments in command summary - Missing punctuation
2016-08-08bump-formula-pr: format documentation for --help.Steven Peters
2016-08-05various: eliminate the usage of `any?` (#638)Xu Cheng
`any?` is not the opposite of `empty?`. Besides the case that `[false, nil].any?` will return false, `any?`(O(n)) has much worse performance than `empty?`(O(1)).
2016-07-13various: proper escape dot in regexXu Cheng
2016-06-17bump-formula-pr: remove formula revisionilovezfs
If we're bumping the formula's stable version, then we also must reset the formula revision to zero. Note that if and only if a revision is being removed, this commit will enforce the convention that there should be a blank line before a simple head spec if and only if there is a formula revision. Any preexisting violation of the convention (in particular, a blank line before a simple head spec in the absence of a formula revision) won't be proactively corrected since we'd not be removing a formula revision in that case. Closes #369. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-06-16bump-formula-pr: reflect new version in dry-runilovezfs
- simulate version change for dry-run - make sure we're using :devel version if called with --devel Closes #318. Signed-off-by: ilovezfs <ilovezfs@icloud.com>