To release we tag and publish to NPM using SemVer.
We check all commits since previous release and tag appropriately:
- No version: Docs, Build
- Patch version: Fix
- Minor: New, Update, Upgrade
- Major: Breaking
If at least one breaking commit since last release we tag as major.
Else, if at least one new, update or upgrade commit we tag as minor.
Else, if fix we tag as patch.
Else, if docs or build we don't need to do a release.
RELEASE=true npm run release:<major|minor|patch>
Note: RELEASE=true
informs the git pre-commit hook not to run
Issues:
- Does not work in Fish
- Does not work in Windows
- npm run preversion
- git checkout master
- git pull
- npm install
- npm run version
- webpack --env=dist (generate distribution js)
- git add dist/* (add webpack generated distribution)
- git commit -m 'Release: <major|minor|patch> version <x.x.x>.' (pre-commit hooks will not run for a release)
- npm run postversion
- npm publish (publish to global npm repo)
- git push (git version tag inline with npm version)