mcfly-semantic-release v1.3.0
mcfly-semantic-release
Installation
npm i --save-dev mcfly-semantic-releaseUsage
In your package.json
"scripts": {
"release": "mcfly-semantic-release"
}Running release will do the following:
- Bumps version. By default, this will publish a patch version, if you want to control the semver option you can pass an optional type
--typeargument. The prerelease versions will be in the format of2.3.2-4. valid types are: 'major', 'minor', 'patch', 'premajor', 'preminor', 'prepatch', 'prerelease' - Updates version in files: by default it will only update the root level
package.json. Optionnaly use--fileto specify file paths or files patterns (globs) that can have their version updated as well. Files can bepackage.jsonfiles orconfig.xmlfiles - Commit the changed files with a standard commit message. Default message is
chore(app): Version <version number>. Use--productionto suffix the commit message with the workproduction(can be later used in CI) - Generates changlog based on Angular standard commit messages.
- Generate a tag with the version number.
- Generates a github release with the version number.
"scripts": {
"release": "mcfly-semantic-release.js --files ./package.json ./bower.json ./config.xml ./projects/**/package.json"
}NOTE
the path for the--filesoption is relative to your current root directory
Then, to publish a new version execute the following command:
npm run releaseExample :
npm run release -- --type=minorNOTE
The double--is necessary, this is how npm script propagates its arguments
Alternate github authentication methods
By default mcfly-semantic-release uses basic username & password auth to communicate with github. Whem it runs, you will be prompted for your github username and password before the release will run. If your username for github is available in your git config, mcfly-semantic-release will find it and not prompt you to enter it.
As an alternative to basic auth, you can provide an oauth token (see github oauth). To use a token, make sure it is valid and has the correct scopes for the repo and then pass it as $GITHUB_TOKEN. Then, when prompted for your password, just leave it blank and hit enter and the token will be used for the authentication!
~/dev/mcfly-io/mcfly-semantic-release $> GITHUB_TOKEN=<oauth_token> npm run release
> mcfly-semantic-release@1.0.15 release /Users/marty/dev/mcfly-io/mcfly-semantic-release
> node bin/mcfly-semantic-release.js
Hello marty@mcfly.io, let's publish a new version...
? Please enter your GitHub password (leave blank to use $GITHUB_TOKEN)
Github authentication...
Generating changelog...
Bumping files...
Committing version...
Publishing version...
Release v1.0.16 successfully published!4 years ago
4 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
