1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- module.exports = function (grunt) {
- grunt.initConfig({
- pkgFile: 'package.json',
- 'npm-contributors': {
- options: {
- commitMessage: 'chore: update contributors'
- }
- },
- bump: {
- options: {
- commitMessage: 'chore: release v%VERSION%',
- pushTo: 'upstream',
- commitFiles: [
- 'package.json',
- 'CHANGELOG.md'
- ]
- }
- },
- conventionalChangelog: {
- options: {
- changelogOpts: {
- preset: 'angular'
- }
- },
- release: {
- src: 'CHANGELOG.md'
- }
- }
- })
- require('load-grunt-tasks')(grunt)
- grunt.registerTask('default', [])
- grunt.registerTask('release', 'Bump the version and publish to NPM.', function (type) {
- grunt.task.run([
- 'npm-contributors',
- 'bump-only:' + (type || 'patch'),
- 'conventionalChangelog',
- 'bump-commit',
- 'npm-publish'
- ])
- })
- }
|