Skip to content

Instantly share code, notes, and snippets.

@woile
Last active July 26, 2020 15:22
Show Gist options
  • Select an option

  • Save woile/4c13a7c9f64c81fbb18169bec8e883c7 to your computer and use it in GitHub Desktop.

Select an option

Save woile/4c13a7c9f64c81fbb18169bec8e883c7 to your computer and use it in GitHub Desktop.
Commitizen demo example
#!/bin/sh -e
set -v
# python -m pip install -U commitizen
cd /tmp
mkdir cz-example/
cd cz-example/
git init
# --------------------------------------------
read
cat <<EOT > .cz.toml
[tool.commitizen]
version = "0.0.1"
EOT
cat .cz.toml
git add .cz.toml
# --------------------------------------------
read
touch users.py
git add users.py
git commit -am "feat: add users component"
# --------------------------------------------
read
touch employees.py
git add employees.py
git commit -am "feat: add employees component"
# --------------------------------------------
read
cz bump --yes --changelog
# --------------------------------------------
read
ls
# --------------------------------------------
read
cat CHANGELOG.md
# --------------------------------------------
read
git rm employees.py
git commit -am "feat: add employees component
BREAKING CHANGE: employees no longer supported, just user users now, the interface is the same"
# --------------------------------------------
read
cz bump --yes --changelog
# --------------------------------------------
read
cat CHANGELOG.md
# --------------------------------------------
read
rm -rf /tmp/cz-example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment