Resource for https://www.youtube.com/watch?v=JlfCRlFHmd8
ref: https://github.com/DevInsideYou/learning-resources/blob/master/Conventional.md
ref: https://www.conventionalcommits.org/en/v1.0.0/
sudo npm install -g commitizen
sudo npm install -g cz-conventional-changelog
Feel free to use a target local to your project.
echo '{ "path": "cz-conventional-changelog" }' > ~/.czrc
npm install -g commitizen
npm install -g cz-conventional-changelog
cz-emoji (optional)
Note: this requires changes to commitlint.
sudo npm install -g cz-emoji
Replaces cz-conventional-changelog
.
echo '{ "path": "cz-emoji" }' > ~/.czrc
Optionally use unicode instead of gitmoji by editing the ~/.czrc
:
{
"path": "cz-emoji",
"config": {
"cz-emoji": {
"symbol": true
}
}
}
It can be used to push from vscode to git server
https://marketplace.visualstudio.com/items?itemName=KnisterPeter.vscode-commitizen
It will be used to generate changelog that contains a full information about new features, breaking changes, refactors, bug fixes and etc... . It's good for versioin releasing.
npm install -g conventional-changelog-cli
cd my-project
conventional-changelog -p angular -i CHANGELOG.md -s
cd /path/to/my/repo
echo 'echo "$(cat $1)" | commitlint' > .git/hooks/commit-msg
chmod +x .git/hooks/commit-msg
sudo npm install -g standard-version
Contents of my-project/.versionrc.json
:
{
"bumpFiles": [
{
"filename": "version.sbt",
"updater": "standard-version-updater.js"
}
]
}
Contents of my-project/standard-version-updater.js
:
module.exports.readVersion = contents =>
contents.match(/"(?<version>.*)"/).groups.version
module.exports.writeVersion = (_, version) =>
`ThisBuild / version := "${version}"\n`