Skip to content

Commit

Permalink
brew bump-cask-pr above cask-repair (#89077)
Browse files Browse the repository at this point in the history
* Contributing: bump-cask-pr above cask-repair

* update_cask_family: bump-cask-pr instead of cask-repair
  • Loading branch information
vitorgalvao committed Sep 11, 2020
1 parent 59d2239 commit 6e72e9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
11 changes: 3 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,13 @@

## Updating a Cask

Notice an application that's out-of-date in Homebrew Cask? In most cases, it's very simple to update it. We have a [script](https://github.com/vitorgalvao/tiny-scripts/blob/master/cask-repair) that will ask for the new version number, and take care of updating the Cask file and submitting a pull request to us:
Notice an application that's out-of-date in Homebrew Cask? In most cases, it's very simple to update it. We have a command that will accept a new version number and take care of updating the Cask file and submitting a pull request to us:

```bash
# install and setup script - only needed once
brew install vitorgalvao/tiny-scripts/cask-repair
cask-repair --help

# use to update <outdated_cask>
cask-repair <outdated_cask>
brew bump-cask-pr --version <new_version> <outdated_cask>
```

If there is a more complicated change, or there is a case where `cask-repair` fails (for example, where a Cask uses a [`url do` block](https://github.com/Homebrew/homebrew-cask-versions/blob/2bf0f13dd49d263ebec0ca56e58ad8458633f789/Casks/vlc-nightly.rb#L5L10) or the [`language` stanza](https://github.com/Homebrew/homebrew-cask/blob/306b8fbd9502036f1ca742f70c569d8677b62403/Casks/firefox.rb#L4L74)), you can also follow the steps in [Adding a Cask](doc/development/adding_a_cask.md) to do the same thing manually. Remember to update the `version` and `sha256` values.
If you want more control over the PR or are looking for our old tool, install [`cask-repair`](https://github.com/vitorgalvao/tiny-scripts/blob/master/cask-repair) (`brew install vitorgalvao/tiny-scripts/cask-repair`). You can also follow the steps in [Adding a Cask](doc/development/adding_a_cask.md) for more complicated changes.


## Getting Set Up To Contribute
Expand Down
7 changes: 1 addition & 6 deletions developer/bin/update_cask_family
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ function get_unity {
brew search 'unity' | grep '^unity' | grep --invert-match --extended-regexp '(hub|player|assets)'
}

if ! command -v 'cask-repair' &>/dev/null; then
echo 'You need cask-repair to run this script'
exit 1
fi

if [[ -z "${new_version}" ]] || ! is_in_array "${cask_family}" "${families[@]}"; then
usage
exit 1
Expand All @@ -79,5 +74,5 @@ for cask in $(get_${cask_family}); do
continue
fi

cask-repair --cask-version "${new_version}" --blind-submit "${cask}"
brew bump-cask-pr --no-browse --version "${new_version}" "${cask}"
done

0 comments on commit 6e72e9a

Please sign in to comment.