@@ -55,18 +55,21 @@ $(ok Scope:)
55
55
$( info minor) $( comment " Bumps the <minor> part of semver." )
56
56
57
57
$( ok Options:)
58
- $( info " -c --chlog" ) $( comment " Forces creation of CHANGELOG.md file." )
59
- $( info " -h --help" ) $( comment " Show help information and usage." )
60
- $( info " -H --chash" ) $( comment " Prepends commit hash into log." )
61
- $( info " -p --public" ) $( comment " Set scoped npm package for public access." )
62
- $( info " -u --update" ) $( comment " Update ${PLIZ} to latest version." )
63
- $( info " -v --vfile" ) $( comment " Forces creation of VERSION file." )
64
- $( info " -V --version" ) $( comment " Forces the exact version to be released." )
65
- $( info " -y --yes" ) $( comment " Assume yes for any confirmation." )
58
+ $( info " -c --chlog" ) $( comment " Forces creation of CHANGELOG.md file." )
59
+ $( info " -h --help" ) $( comment " Show help information and usage." )
60
+ $( info " -H --chash" ) $( comment " Prepends commit hash into log." )
61
+ $( info " -o --organize" ) $( comment " Commit types as CSV for changelog or release notes." )
62
+ $( comment " (Default: feat,fix,refactor,perf,docs,infra,chore)" )
63
+ $( info " -p --public" ) $( comment " Set scoped npm package for public access." )
64
+ $( info " -u --update" ) $( comment " Update ${PLIZ} to latest version." )
65
+ $( info " -v --vfile" ) $( comment " Forces creation of VERSION file." )
66
+ $( info " -V --version" ) $( comment " Forces the exact version to be released." )
67
+ $( info " -y --yes" ) $( comment " Assume yes for any confirmation." )
66
68
67
69
$( ok Examples:)
68
70
please
69
71
please --update
72
+ please --organize feat,fix,docs # only features, fixes and docs are included
70
73
please --vfile --chash
71
74
please minor --public --yes
72
75
please major --vfile --chlog
76
79
}
77
80
78
81
# organize commits
79
- organize-commits () # $1 = diff_range, $2 = commit_type
82
+ organize-commits () # $1 = diff_range, $2 = commit_types_csv
80
83
{
81
84
declare -A LABELS=(
82
85
[feat]=Features
214
217
-H | --chash) GCFMT=" ${GCFMT} [_%h_](https://github.com/${REPO} /commit/%h)" ; shift 1 ;;
215
218
-y | --yes) YES=1; shift 1 ;;
216
219
-V | --version) NEXT_VERSION=$2 ; shift 2 ;;
220
+ -o | --organize) TYPES=$2 ; shift 2 ;;
217
221
minor) MINOR=1; shift 1 ;;
218
222
major) MAJOR=1; shift 1 ;;
219
223
* ) error " Invalid arg ${1} . (Run ${PLIZ} --help)" ; exit 1 ;;
265
269
ok " Done [${VERSION} ]"
266
270
267
271
info " Collecting commits ..."
268
- COMMITS=` organize-commits " $RANGE " `
272
+ COMMITS=` organize-commits " $RANGE " " $TYPES " `
269
273
ok
270
274
271
275
if [ " " == " $COMMITS " ]; then
0 commit comments