diff --git a/developer/bin/update_issue_template_urls b/developer/bin/update_issue_template_urls deleted file mode 100755 index 63448b02fb..0000000000 --- a/developer/bin/update_issue_template_urls +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env bash -# -# update_issue_template_urls -# - -### -### settings -### - -set -e # exit on uncaught error -set +o histexpand # don't expand history expressions -shopt -s nocasematch # case-insensitive regular expressions - -### -### constants -### - -script_subdir='developer/bin' -template_subdir='doc/issue_templates' -generate_url_script='generate_issue_template_url' -files_to_update=(README.md doc/readme.md doc/reporting_bugs/*) - -### -### functions -### - -warn () { - local message="$*" - message="${message//\\t/$'\011'}" - message="${message//\\n/$'\012'}" - message="${message%${message##*[![:space:]]}}" - printf "%s\n" "$message" 1>&2 -} - -die () { - warn "$@" - exit 1 -} - -usage () { - printf "update_issue_template_urls - -Regenerate issue template URLs and update them in relevant files. - -Note: docs using issue template URLs must use a specific format. -If the template file is called 'bug_report.md', the URL must be -referenced in the doc as follows: - - [Some link text][bug_report_template] - - ... - - [bug_report_template]: (auto-generated-url) - -" -} - -cd_to_project_root () { - local script_dir git_root - script_dir="$(/usr/bin/dirname "$0")" - cd "$script_dir" - git_root="$(git rev-parse --show-toplevel)" - if [[ -z "$git_root" ]]; then - die "ERROR: Could not find git project root" - fi - cd "$git_root" -} - -generate_template_url () { - local template_file="$1" - "$script_subdir/$generate_url_script" "$template_file" -} - -update_template_url () { - local template_name="$1" - local template_url="$2" - local escaped_template_url="${template_url/&/\\&}" - - /usr/bin/sed -i '' \ - -e "s|^\\(\\[${template_name}\\]: \\).*$|\\1${escaped_template_url}|g" \ - -- "${files_to_update[@]}" -} - -### -### main -### - -_update_issue_template_urls () { - local template_file template_name template_url - cd_to_project_root - for template_file in ./$template_subdir/*; do - template_name="${template_file##*/}" - template_name="${template_name%%.*}" - template_url="$(generate_template_url "$template_file")" - update_template_url "$template_name" "$template_url" - done -} - -# process args -if [[ $1 =~ ^-+h(elp)?$ ]]; then - usage - exit -fi - -# dispatch main -_update_issue_template_urls diff --git a/doc/issue_templates/issue_dead_app.md b/doc/issue_templates/issue_dead_app.md deleted file mode 100644 index 6b7019a480..0000000000 --- a/doc/issue_templates/issue_dead_app.md +++ /dev/null @@ -1,8 +0,0 @@ -Dead app: - -* Insert the name of the cask in the title, after the `:`. -* Insert the name of the cask and a link to it in the body of this issue (example: [`alfred`](https://github.com/caskroom/homebrew-cask/blob/master/Casks/alfred.rb)). -* Insert a link to the page that informs about the app being dead. -* After all that **delete all this pre-inserted template text**. - -Failure to follow these instructions may get your issue closed without further explanation. Thank you for taking the time to correctly report the issue. diff --git a/doc/issue_templates/issue_outdated_cask.md b/doc/issue_templates/issue_outdated_cask.md deleted file mode 100644 index 4042f51f40..0000000000 --- a/doc/issue_templates/issue_outdated_cask.md +++ /dev/null @@ -1,8 +0,0 @@ -Outdated cask: - -* Insert the name of the cask in the title, after the `:`. -* Insert the name of the cask and a link to it in the body of this issue (example: [`alfred`](https://github.com/caskroom/homebrew-cask/blob/master/Casks/alfred.rb)). -* Insert the new version of the app. -* After all that **delete all this pre-inserted template text**. - -Failure to follow these instructions may get your issue closed without further explanation. Thank you for taking the time to correctly report the issue. diff --git a/doc/issue_templates/issue_outdated_cask_but_cannot_find_link.md b/doc/issue_templates/issue_outdated_cask_but_cannot_find_link.md deleted file mode 100644 index 6d27582a57..0000000000 --- a/doc/issue_templates/issue_outdated_cask_but_cannot_find_link.md +++ /dev/null @@ -1,8 +0,0 @@ -Outdated cask but cannot find link: - -* Insert the name of the cask in the title, after the `:`. -* Insert the name of the cask and a link to it in the body of this issue (example: [`alfred`](https://github.com/caskroom/homebrew-cask/blob/master/Casks/alfred.rb)). -* Insert a detailed explanation of what you tried to do and why you failed to find the download link. -* After all that **delete all this pre-inserted template text**. - -Failure to follow these instructions may get your issue closed without further explanation. Thank you for taking the time to correctly report the issue. diff --git a/doc/issue_templates/issue_source_not_there_and_cannot_find_it.md b/doc/issue_templates/issue_source_not_there_and_cannot_find_it.md deleted file mode 100644 index 053d86814f..0000000000 --- a/doc/issue_templates/issue_source_not_there_and_cannot_find_it.md +++ /dev/null @@ -1,8 +0,0 @@ -Source not there and cannot find it: - -* Insert the name of the cask in the title, after the `:`. -* Insert the name of the cask and a link to it in the body of this issue (example: [`alfred`](https://github.com/caskroom/homebrew-cask/blob/master/Casks/alfred.rb)). -* Insert a detailed explanation of what you tried to do and why you failed to find the new artifact source. -* After all that **delete all this pre-inserted template text**. - -Failure to follow these instructions may get your issue closed without further explanation. Thank you for taking the time to correctly report the issue. diff --git a/doc/issue_templates/issue_wrong_number_of_arguments.md b/doc/issue_templates/issue_wrong_number_of_arguments.md deleted file mode 100644 index 77ba5544ef..0000000000 --- a/doc/issue_templates/issue_wrong_number_of_arguments.md +++ /dev/null @@ -1,8 +0,0 @@ -Getting wrong number of arguments and cannot fix: - -* Insert the name of the cask in the title, after the `:`. -* Insert the name of the cask and a link to it in the body of this issue (example: [`alfred`](https://github.com/caskroom/homebrew-cask/blob/master/Casks/alfred.rb)). -* Insert a detailed explanation of what you tried to do and the current situation. -* After all that **delete all this pre-inserted template text**. - -Failure to follow these instructions may get your issue closed without further explanation. Thank you for taking the time to correctly report the issue. diff --git a/doc/reporting_bugs/checksum_does_not_match_error_fix_outdated.md b/doc/reporting_bugs/checksum_does_not_match_error_fix_outdated.md index e8129be7c0..fd9bdf6c4f 100644 --- a/doc/reporting_bugs/checksum_does_not_match_error_fix_outdated.md +++ b/doc/reporting_bugs/checksum_does_not_match_error_fix_outdated.md @@ -8,6 +8,4 @@ Let's bring the cask up to date. It’ll likely need a new version, but it’s p 3. Take a look at the cask’s version (`brew cask _stanza version {{cask_name}}`) and verify it is indeed outdated. * If the app’s version is `latest`, it means the `url` itself is outdated. It will need to be changed to the new one. -If it is outdated, start by trying to [submit a fix](../../CONTRIBUTING.md#updating-a-cask). If you’re having trouble, open an issue [with this template][issue_outdated_cask] explaining your steps so far and why you’re having trouble submitting the update. - -[issue_outdated_cask]: https://github.com/caskroom/homebrew-cask/issues/new?title=Outdated%20cask%3A%20&body=%0A%2A%20Insert%20the%20name%20of%20the%20cask%20in%20the%20title%2C%20after%20the%20%60%3A%60.%0A%2A%20Insert%20the%20name%20of%20the%20cask%20and%20a%20link%20to%20it%20in%20the%20body%20of%20this%20issue%20%28example%3A%20%5B%60alfred%60%5D%28https%3A%2F%2Fgithub.com%2Fcaskroom%2Fhomebrew-cask%2Fblob%2Fmaster%2FCasks%2Falfred.rb%29%29.%0A%2A%20Insert%20the%20new%20version%20of%20the%20app.%0A%2A%20After%20all%20that%20%2A%2Adelete%20all%20this%20pre-inserted%20template%20text%2A%2A.%0A%0AFailure%20to%20follow%20these%20instructions%20may%20get%20your%20issue%20closed%20without%20further%20explanation.%20Thank%20you%20for%20taking%20the%20time%20to%20correctly%20report%20the%20issue.%0A +If it is outdated, start by trying to [submit a fix](../../CONTRIBUTING.md#updating-a-cask). If you’re having trouble, [open an issue](https://github.com/caskroom/homebrew-cask/issues/new?template=01_bug_report.md) explaining your steps so far and why you’re having trouble submitting the update. diff --git a/doc/reporting_bugs/curl_error_fix_no_download.md b/doc/reporting_bugs/curl_error_fix_no_download.md index d39048def3..1991843937 100644 --- a/doc/reporting_bugs/curl_error_fix_no_download.md +++ b/doc/reporting_bugs/curl_error_fix_no_download.md @@ -3,8 +3,7 @@ There are a few reasons why you might not be finding a download: * You can’t access the vendor’s website at all. [Continue here](curl_error_fix_wont_fix.md). -* You can access the vendor’s site but they’re informing you the app is now discontinued. Submit a pull request deleting the cask or open an issue [with this template][issue_dead_app] informing us of the situation. -* You can access the vendor’s site but you cannot find the download link. [Open an issue][issue_outdated_cask_but_cannot_find_link] and detail all your steps so far. +* You can access the vendor’s site but they’re informing you the app is now discontinued. Submit a pull request deleting the cask or [open an issue][01_bug_report] informing us of the situation. +* You can access the vendor’s site but you cannot find the download link. [Open an issue][01_bug_report] and detail all your steps so far. -[issue_dead_app]: https://github.com/caskroom/homebrew-cask/issues/new?title=Dead%20app%3A%20&body=%0A%2A%20Insert%20the%20name%20of%20the%20cask%20in%20the%20title%2C%20after%20the%20%60%3A%60.%0A%2A%20Insert%20the%20name%20of%20the%20cask%20and%20a%20link%20to%20it%20in%20the%20body%20of%20this%20issue%20%28example%3A%20%5B%60alfred%60%5D%28https%3A%2F%2Fgithub.com%2Fcaskroom%2Fhomebrew-cask%2Fblob%2Fmaster%2FCasks%2Falfred.rb%29%29.%0A%2A%20Insert%20a%20link%20to%20the%20page%20that%20informs%20about%20the%20app%20being%20dead.%0A%2A%20After%20all%20that%20%2A%2Adelete%20all%20this%20pre-inserted%20template%20text%2A%2A.%0A%0AFailure%20to%20follow%20these%20instructions%20may%20get%20your%20issue%20closed%20without%20further%20explanation.%20Thank%20you%20for%20taking%20the%20time%20to%20correctly%20report%20the%20issue.%0A -[issue_outdated_cask_but_cannot_find_link]: https://github.com/caskroom/homebrew-cask/issues/new?title=Outdated%20cask%20but%20cannot%20find%20link%3A%20&body=%0A%2A%20Insert%20the%20name%20of%20the%20cask%20in%20the%20title%2C%20after%20the%20%60%3A%60.%0A%2A%20Insert%20the%20name%20of%20the%20cask%20and%20a%20link%20to%20it%20in%20the%20body%20of%20this%20issue%20%28example%3A%20%5B%60alfred%60%5D%28https%3A%2F%2Fgithub.com%2Fcaskroom%2Fhomebrew-cask%2Fblob%2Fmaster%2FCasks%2Falfred.rb%29%29.%0A%2A%20Insert%20a%20detailed%20explanation%20of%20what%20you%20tried%20to%20do%20and%20why%20you%20failed%20to%20find%20the%20download%20link.%0A%2A%20After%20all%20that%20%2A%2Adelete%20all%20this%20pre-inserted%20template%20text%2A%2A.%0A%0AFailure%20to%20follow%20these%20instructions%20may%20get%20your%20issue%20closed%20without%20further%20explanation.%20Thank%20you%20for%20taking%20the%20time%20to%20correctly%20report%20the%20issue.%0A +[01_bug_report]: https://github.com/caskroom/homebrew-cask/issues/new?template=01_bug_report.md diff --git a/doc/reporting_bugs/curl_error_fix_outdated.md b/doc/reporting_bugs/curl_error_fix_outdated.md index 9c2f5b6efd..d00b031ce6 100644 --- a/doc/reporting_bugs/curl_error_fix_outdated.md +++ b/doc/reporting_bugs/curl_error_fix_outdated.md @@ -6,6 +6,4 @@ Since the download started, it likely means the cask is outdated. Let's fix it: 2. Take a look at the cask’s version (`brew cask _stanza version {{cask_name}}`) and verify it is indeed outdated. * If the app’s version is `latest`, it means the `url` itself is outdated. It will need to be changed to the new one. -If it is outdated, start by trying to [submit a fix](../../CONTRIBUTING.md#updating-a-cask). If you’re having trouble, open an issue [with this template][issue_outdated_cask] explaining your steps so far and why you’re having trouble submitting the update. - -[issue_outdated_cask]: https://github.com/caskroom/homebrew-cask/issues/new?title=Outdated%20cask%3A%20&body=%0A%2A%20Insert%20the%20name%20of%20the%20cask%20in%20the%20title%2C%20after%20the%20%60%3A%60.%0A%2A%20Insert%20the%20name%20of%20the%20cask%20and%20a%20link%20to%20it%20in%20the%20body%20of%20this%20issue%20%28example%3A%20%5B%60alfred%60%5D%28https%3A%2F%2Fgithub.com%2Fcaskroom%2Fhomebrew-cask%2Fblob%2Fmaster%2FCasks%2Falfred.rb%29%29.%0A%2A%20Insert%20the%20new%20version%20of%20the%20app.%0A%2A%20After%20all%20that%20%2A%2Adelete%20all%20this%20pre-inserted%20template%20text%2A%2A.%0A%0AFailure%20to%20follow%20these%20instructions%20may%20get%20your%20issue%20closed%20without%20further%20explanation.%20Thank%20you%20for%20taking%20the%20time%20to%20correctly%20report%20the%20issue.%0A +If it is outdated, start by trying to [submit a fix](../../CONTRIBUTING.md#updating-a-cask). If you’re having trouble, [open an issue](https://github.com/caskroom/homebrew-cask/issues/new?template=01_bug_report.md) explaining your steps so far and why you’re having trouble submitting the update. diff --git a/doc/reporting_bugs/source_is_not_there_fix.md b/doc/reporting_bugs/source_is_not_there_fix.md index cf459e0fcc..1bc82fb3e7 100644 --- a/doc/reporting_bugs/source_is_not_there_fix.md +++ b/doc/reporting_bugs/source_is_not_there_fix.md @@ -23,6 +23,4 @@ The cask was expecting `SomeApp.app` to be in the top directory of the archive ( Note that occasionally the app’s name changes completely (from `SomeApp.app` to `OtherApp.app`, let's say). In these instances, the filename of the cask itself, as well as its token, must also change. Consult the [`token reference`](https://github.com/caskroom/homebrew-cask/blob/master/doc/cask_language_reference/token_reference.md) for complete instructions on the new name. -Follow the instructions to [submit a fix](../../CONTRIBUTING.md#updating-a-cask), and make the change to the cask. If using `cask-repair`, you may give it the `--edit-cask` flag when calling it on the command-line to step right into editing it. If you’re having trouble, open an issue [with this template][issue_source_not_there_and_cannot_find_it] explaining your steps so far and why you’re having trouble submitting the update. - -[issue_source_not_there_and_cannot_find_it]: https://github.com/caskroom/homebrew-cask/issues/new?title=Source%20not%20there%20and%20cannot%20find%20it%3A%20&body=%0A%2A%20Insert%20the%20name%20of%20the%20cask%20in%20the%20title%2C%20after%20the%20%60%3A%60.%0A%2A%20Insert%20the%20name%20of%20the%20cask%20and%20a%20link%20to%20it%20in%20the%20body%20of%20this%20issue%20%28example%3A%20%5B%60alfred%60%5D%28https%3A%2F%2Fgithub.com%2Fcaskroom%2Fhomebrew-cask%2Fblob%2Fmaster%2FCasks%2Falfred.rb%29%29.%0A%2A%20Insert%20a%20detailed%20explanation%20of%20what%20you%20tried%20to%20do%20and%20why%20you%20failed%20to%20find%20the%20new%20artifact%20source.%0A%2A%20After%20all%20that%20%2A%2Adelete%20all%20this%20pre-inserted%20template%20text%2A%2A.%0A%0AFailure%20to%20follow%20these%20instructions%20may%20get%20your%20issue%20closed%20without%20further%20explanation.%20Thank%20you%20for%20taking%20the%20time%20to%20correctly%20report%20the%20issue.%0A +Follow the instructions to [submit a fix](../../CONTRIBUTING.md#updating-a-cask), and make the change to the cask. If using `cask-repair`, you may give it the `--edit-cask` flag when calling it on the command-line to step right into editing it. If you’re having trouble, [open an issue](https://github.com/caskroom/homebrew-cask/issues/new?template=01_bug_report.md) explaining your steps so far and why you’re having trouble submitting the update. diff --git a/doc/reporting_bugs/wrong_number_of_arguments_fix.md b/doc/reporting_bugs/wrong_number_of_arguments_fix.md index c010dc71b3..1c13636aa4 100644 --- a/doc/reporting_bugs/wrong_number_of_arguments_fix.md +++ b/doc/reporting_bugs/wrong_number_of_arguments_fix.md @@ -2,6 +2,4 @@ Make sure the issue really lies with your macOS version. To do so, try to install the software manually. If it is incompatible with your macOS version, it will tell you. In that case, there is nothing we can do to help you install the software, but we can add a [`depends_on macos:`](https://github.com/caskroom/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/depends_on.md#depends_on-macos) stanza to prevent the cask from trying to install on incompatible macOS versions. -Follow the instructions to [submit a fix](../../CONTRIBUTING.md#updating-a-cask), and make the change to the cask. If using `cask-repair`, you may give it the `--edit-cask` flag when calling it on the command-line to step right into editing it. If you’re having trouble submitting the fix or manually installing the software worked without a problem, open an issue [with this template][issue_wrong_number_of_arguments] explaining your steps so far and the current situation. - -[issue_wrong_number_of_arguments]: https://github.com/caskroom/homebrew-cask/issues/new?title=Getting%20wrong%20number%20of%20arguments%20and%20cannot%20fix%3A&body=%0A%2A%20Insert%20the%20name%20of%20the%20cask%20in%20the%20title%2C%20after%20the%20%60%3A%60.%0A%2A%20Insert%20the%20name%20of%20the%20cask%20and%20a%20link%20to%20it%20in%20the%20body%20of%20this%20issue%20%28example%3A%20%5B%60alfred%60%5D%28https%3A%2F%2Fgithub.com%2Fcaskroom%2Fhomebrew-cask%2Fblob%2Fmaster%2FCasks%2Falfred.rb%29%29.%0A%2A%20Insert%20a%20detailed%20explanation%20of%20what%20you%20tried%20to%20do%20and%20the%20current%20situation.%0A%2A%20After%20all%20that%20%2A%2Adelete%20all%20this%20pre-inserted%20template%20text%2A%2A.%0A%0AFailure%20to%20follow%20these%20instructions%20may%20get%20your%20issue%20closed%20without%20further%20explanation.%20Thank%20you%20for%20taking%20the%20time%20to%20correctly%20report%20the%20issue.%0A +Follow the instructions to [submit a fix](../../CONTRIBUTING.md#updating-a-cask), and make the change to the cask. If using `cask-repair`, you may give it the `--edit-cask` flag when calling it on the command-line to step right into editing it. If you’re having trouble submitting the fix or manually installing the software worked without a problem, [open an issue](https://github.com/caskroom/homebrew-cask/issues/new?template=01_bug_report.md) explaining your steps so far and the current situation.