alittlejacket
v3.3.1
Published
Readme
Angular commit convention:
Patch Release (1.0.1)
The chore(ci): ... commit message should trigger patch release.
git commit -m "chore(ci): setup CI"Bug fixing
For example, if we fix a bug, we should commit code with message that starts with fix(what): ....
git commit -m "fix(log): fixed logging call"Minor (Feature) Release (1.1.1)
A commit that adds a new feature should start with feat(what): ....
git commit -m "feat(release): semantic release FTW"Major (Breaking) Release (2.0.0)
Any commit that breaks existing API should have BREAKING CHANGE text somewhere inside the commit message text.
git commit -m "perf(pencil): remove graphiteWidth option
BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reason."Normal commit
If yu do not want to release a new version, just commit with regular text that does not start with fix, feat, etc.
The CI job needs to authenticate with both NPM registry to publish, and with GitLab itself to push new tag.
What should be done by Semantic-release-gitlab?
the actual commit log parsing, version increment, publishing new version and tagging the release is done by the module semantic-release-gitlab
NPM Config
- The npm token can only be defined in the environment as NPM_TOKEN, because that's where npm itself is going to read it from.
- In order to publish to a different npm registry you can specify that inside the package.json's publishConfig field.
Why is the package.json's version not updated in my repository?
While this entirely true the version number doesn’t have to be checked into source control. semantic-release takes care of the version field right before npm publish uses it – and this is the only point where it really is required.
NPM Publish
npm publish --tag dev npm install human-data-range@dev
publishing a new version to npm
- change the version in package.json
- then run npm publish or npm version
npm version patch: to bump the last number npm version minor: to bump the middle number npm version major: to bump the first number
if you fix a bug in your module, the correct way to make a new release whould be to run: npm version patch npm publish
versioning in a repository my project at v0.1.0 that's what's in my package.json file in my master branch.
- update version
- write a changelog
- Lint/test source code
- compile/build code
- save the the version number
- tag the lastest commit
- push the commit and the tag
