Make a new GitLab release from git metadata.
Note You don't have to use the angular commit convention. For the best result of the tool to tokenize you commit and produce flexible output, it's recommended to use a commit convention.
Table of Contents
- Quick start
- Example output
- Programmatic Usage
- Setup token for cli
- Node Support Policy
$ npm install -g conventional-gitlab-releaser$ cd my-project$ conventional-gitlab-releaser -p angular
The above generates a GitLab Release based on commits since the last semver tag that match the pattern of a "Feature", "Fix", "Performance Improvement" or "Breaking Changes".
If you first time use this tool and want to generate all previous releases, you could do
$ conventional-gitlab-releaser -p angular -r 0
This will not overwrite the releases you have already made. Read "Regenerate all the releases" section if you want to.
All available command line parameters can be listed using CLI :
Hint: You can alias your command or add it to your package.json. EG:
"gitlab-release": "conventional-gitlab-releaser -p angular -r 0".
- Make changes
- Commit those changes
- Make sure GitLab CI turns green
- Bump version in
You have to have a tag on GitLab to make a release. hence
gitRawCommitsOpts.to defaults to the latest semver tag.
Please use this gist to make a release or change it to your needs.
- Based on conventional-changelog but GitLab releases are more elegant.
- Easy fully automate changelog generation. You could still add more points on top of it.
- Detecting prerelease based on semver, ignoring reverted commits, templating with handlebars.js and links to references, etc. Open an issue if you want more reasonable features.
- Intelligently setup defaults but yet fully configurable with presets of popular projects.
- Everything internally or externally is pluggable.
- A lot of tests and actively maintained.
Required GitLab CE/EE Edition
Version 9.0, or higher, of GitLab CE/EE is required for
Core features used:
This only applies to you if you're running your own instance of GitLab. GitLab.com is always the latest version of the GitLab application.
$ npm install --save conventional-gitlab-releaser
var conventionalGitlabReleaser = ;var AUTH =url: ''token: '0126af95c0e2d9b0a7c78738c4c00a860b04acc8';;
conventionalGitlabReleaser(auth, [changelogOpts, [context, [gitRawCommitsOpts, [parserOpts, [writerOpts]]]]], callback)
An authentication object containing the following:
token- A GitLab Private Token with Developer permissions on the project to be released.
url- The GitLab API (such as
url: ''token: '0126af95c0e2d9b0a7c78738c4c00a860b04acc8'
An array of responses returned by
Please check conventional-changelog for other arguments.
There are some changes:
Default: grab the whole tag for the version (including a leading v) and format date.
How many releases of changelog you want to generate. It counts from the latest semver tag. Useful when you forgot to generate any previous releases. Set to
0 to regenerate all.
Default: based on
Default: latest semver tag
It is always
Default header contains the version and date which are already in the release.
$ npm install --global conventional-gitlab-releaser$ conventional-gitlab-releaser --help # for more details
You can supply your auth token by a flag
--token. You can also set up an environment variable
CONVENTIONAL_GITLAB_RELEASER_TOKEN to avoid typing your token every time.
Note: If all results error, it will print the error messages to stderr and exit with code
Setup token for cli
- conventional-changelog - Generate a changelog from git metadata
- conventional-recommended-bump - Get a recommended version bump based on conventional commits
- conventional-commits-detector - Detect what commit message convention your repository is using
To assist users of
conventional-gitlab-releaser with debugging the behavior of this module we use the debug utility package to print information about the release process to the console. To enable debug message printing, the environment variable
DEBUG, which is the variable used by the
debug package, must be set to a value configured by the package containing the debug messages to be printed.
To print debug messages on a unix system set the environment variable
DEBUG with the name of this package prior to executing
On the Windows command line you may do:
Node Support Policy
We only support Long-Term Support versions of Node.
We specifically limit our support to LTS versions of Node, not because this package won't work on other versions, but because we have a limited amount of time, and supporting LTS offers the greatest return on that investment.
It's possible this package will work correctly on newer versions of Node. It may even be possible to use this package on older versions of Node, though that's more unlikely as we'll make every effort to take advantage of features available in the oldest LTS version we support.
As each Node LTS version reaches its end-of-life we will remove that version from the
engines property of our package's
package.json file. Removing a Node version is considered a breaking change and will entail the publishing of a new major version of this package. We will not accept any requests to support an end-of-life version of Node. Any merge requests or issues supporting an end-of-life version of Node will be closed.
We will accept code that allows this package to run on newer, non-LTS, versions of Node. Furthermore, we will attempt to ensure our own changes work on the latest version of Node. To help in that commitment, our continuous integration setup runs against all LTS versions of Node in addition the most recent Node release; called current.
engines property. If you encounter issues installing this package, please report the issue to your package manager.
Please read our contributing guide to see how you may contribute to this project.
MIT © Steve Mao