Skip to content

Commit 52547eb

Browse files
committed
bugfix: un-capitalised first letter of changelog entry for ver-bump's own commit msg
- because the rest of commit messages are lowercase (personal preference... see next bullet) - probably best left to the user to capitalise or not, perhaps don't enforce it (added future option to TODO.md) - updated BATS test case for changelog output assert test
1 parent bae802a commit 52547eb

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

TODO.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
📦 A handy utility that takes care of releasing Git software projects
33

44
### Todo — General ⏳
5-
- [ ] Docs: Instructions for creating a Gh package
6-
- [ ] Docs: General tidy-up of the concepts
7-
- [ ] New feature: Add switches for increasing MAJOR|MINOR|PATCH
8-
- [ ] New feature: Releasing packages: Create automation for proper gh release
5+
- [ ] docs: Instructions for creating a Gh package
6+
- [ ] docs: General tidy-up of the concepts
7+
- [ ] feature: Add switches for increasing MAJOR|MINOR|PATCH
8+
- [ ] feature: Releasing packages: Create automation for proper gh release
9+
- [ ] feature: Add option for capitalising ver-bump's commit msg for files it changes (for style purposes)
910

1011
### Doing 🚀
1112

1213
### Done ✔️
13-
- [x] Docs: Create GIF screenshot
14-
- [x] New feature: Switch to disable pause during CHANGELOG.md creation
15-
- [x] Tests: Unit tests (with https://github.com/bats-core/bats-core)
16-
- [x] Bug: Fix issue with running on v1.0.0, or any other version already present ONLY in package.json and not tagged.
17-
- [x] Docs: Inform user how the script works in the current branch
18-
- [x] Docs: Local `npm` install
19-
- [x] Docs: Semver + Gh branching model
20-
- [x] Docs: Document all remaining switches
14+
- [x] docs: Create GIF screenshot
15+
- [x] feature: Switch to disable pause during CHANGELOG.md creation
16+
- [x] tests: Unit tests (with https://github.com/bats-core/bats-core)
17+
- [x] bugfix: Fix issue with running on v1.0.0, or any other version already present ONLY in package.json and not tagged.
18+
- [x] docs: Inform user how the script works in the current branch
19+
- [x] docs: Local `npm` install
20+
- [x] docs: Semver + Gh branching model
21+
- [x] docs: Document all remaining switches

lib/helpers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ do-changelog() {
337337
# Log the bumping commit:
338338
# - The final commit is done after do-changelog(), so we need to create the log entry for it manually:
339339
LOG_MSG="${GIT_MSG}$(get-commit-msg)"
340-
LOG_MSG="$( capitalise "${LOG_MSG}" )" # Capitalise first letter
340+
# LOG_MSG="$( capitalise "${LOG_MSG}" )" # Capitalise first letter
341341
echo "- ${COMMIT_MSG_PREFIX}${LOG_MSG}" >> tmpfile
342342
# Add previous commits
343343
[ -n "$COMMITS_MSG" ] && echo "$COMMITS_MSG" >> tmpfile

test/ver-bump.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ jsonfile_get_ver() {
379379
assert_output -p "Updated [CHANGELOG.md] file"
380380

381381
# Test CL.md actually contains the line
382-
grep -F "Updated ${F_CL}, bumped ${V_PREV} -> ${V_NEW}" $F_CL
382+
grep -F "updated ${F_CL}, bumped ${V_PREV} -> ${V_NEW}" $F_CL
383383
assert_success
384384
}
385385

0 commit comments

Comments
 (0)