A release generator for Yeoman
Yeoman generator for handling Bower/NPM releases.
npm install -g yo generator-release
A config file,
~/.config/generator-release, needs to be created. This is standard CommonJS module exporting github authentication options. The easiest way to configure the authentication is to go to the GitHub admin panel and create a Personal Access Token, then set it as the
token in your config.
Optionally the module may export a
linkFilter method that allows for parsing of links included in the body of notes issues and pull requests.
moduleexports =auth: 'oauth'token: 'GitHub OAuth token'return /atlassian\.net/testlinkurl;;
generator-release can work against GitHub enterprise hosts when defined in the
moduleexports =auth: 'oauth'token: 'GitHub OAuth token'hosts:'my.host':token: 'Enterprise GitHub OAuth token'apiUrl: '';
When operating against a matching host, the entire object will be used to extend the base config object, allowing for any config object to be overridden per host. In the example above this is akin to
Will generate a template for the release notes including:
- Github issues closed since the last release
- Gitub pull requests closed since the last release
- Commits not associated with pull requests
This should be manually edited to ensure that only relevant content is display and any additional gotchas and upgrade concerns noted. If the
$EDITOR environment variable is setup the generator will automate the checkin of the updated notes.
--dry-run— finds the changes that will be recorded and log to the console rather than disk.
--rebuild- specifes that we want to create notes for the existing version
yo release:release [major|minor|patch|prerelease]
Will increment the release version per the semver action passed in and tag and pushes to the upstream repository.
If publishing to npm the
npm publish command is still required.
The increment parameter is optional and not recommended if the release notes were just updated for the project.
--skip-tests— skips tests (this is not recommended but can be used to work around environmental issues)
Shorthand for the tasks above. Will execute both the notes and release tasks via a single command. Note that the
$EDITOR environment variable must be set to a supporting editor to use this mode.
yo release:collect-versions npm > oldVersion.jsonyo release:diff oldVersion.json npm
yo release:collect-versions bower > oldVersion.jsonyo release:diff oldVersion.json bower
Generates a report of the versions that have changed for all packages. Includes release notes for packages that include them.
Note that the arguments to
release:diff may be any combination of files or
bower meta commands.
yo release:publish [cdnjs|components] projectName sourceDir
Pushes a particular directory of artifacts to cdnjs or the github components project, optionally creating pull requests if the executing user does not have adequate permissions to directly push.
Note that at this time only frontend publishing is possible. NPM publishing should still be done directly through the
npm publish command.
Enterprise hosts may be published to using the