@@ -55,18 +55,21 @@ $(ok Scope:)
5555 $( info minor) $( comment " Bumps the <minor> part of semver." )
5656
5757$( 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." )
6668
6769$( ok Examples:)
6870 please
6971 please --update
72+ please --organize feat,fix,docs # only features, fixes and docs are included
7073 please --vfile --chash
7174 please minor --public --yes
7275 please major --vfile --chlog
7679}
7780
7881# organize commits
79- organize-commits () # $1 = diff_range, $2 = commit_type
82+ organize-commits () # $1 = diff_range, $2 = commit_types_csv
8083{
8184 declare -A LABELS=(
8285 [feat]=Features
214217 -H | --chash) GCFMT=" ${GCFMT} [_%h_](https://github.com/${REPO} /commit/%h)" ; shift 1 ;;
215218 -y | --yes) YES=1; shift 1 ;;
216219 -V | --version) NEXT_VERSION=$2 ; shift 2 ;;
220+ -o | --organize) TYPES=$2 ; shift 2 ;;
217221 minor) MINOR=1; shift 1 ;;
218222 major) MAJOR=1; shift 1 ;;
219223 * ) error " Invalid arg ${1} . (Run ${PLIZ} --help)" ; exit 1 ;;
265269ok " Done [${VERSION} ]"
266270
267271info " Collecting commits ..."
268- COMMITS=` organize-commits " $RANGE " `
272+ COMMITS=` organize-commits " $RANGE " " $TYPES " `
269273ok
270274
271275if [ " " == " $COMMITS " ]; then
0 commit comments