From 42a5a2c1065c4b31c26d56abd1ee6ca6f877cbd1 Mon Sep 17 00:00:00 2001 From: Phil Runninger Date: Tue, 14 Jul 2020 08:32:29 -0400 Subject: [PATCH] Update PULL_REQUEST_TEMPLATE.md Make the tag creation process semi-automatic by making bash do more of the legwork. The included bash commands will: 1. Make sure your master branch is up to date 2. Display all the patch releases in the current MAJOR.MINOR version 3. Ask for a version number to use as the tag (one of the ones previously displayed, presumably) 4. Get the latest commit's subject line, and use it in the tag's message field. 5. Create the tag, and push all tags to the origin. --- .github/PULL_REQUEST_TEMPLATE.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 24dba3f..39959b4 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,5 @@ ### Description of Changes -Closes # +Closes # --- @@ -13,4 +13,10 @@ Closes # - [ ] Update [CHANGELOG.md](https://github.com/scrooloose/nerdtree/blob/master/CHANGELOG.md), following the established pattern. #### Collaborator's Instructions - [ ] Review [CHANGELOG.md](https://github.com/scrooloose/nerdtree/blob/master/CHANGELOG.md), suggesting a different version number if necessary. -- [ ] After merge, tag the merge commit, e.g. `git tag -a 3.1.4 -m "v3.1.4" && git push origin --tags` +- [ ] After merging, tag the commit using these (Mac-compatible) bash commands: + ```bash + git checkout master + git pull + sed -n "$(grep -n '####' CHANGELOG.md | head -2 | sed -e 's/:.*//' | sed 'N;s/\n/,/')p" CHANGELOG.md | sed '$d' + git tag -a $(read -p "Tag Name: " tag;echo $tag) -m"$(git show --quiet --pretty=%s)";git push origin --tags + ```