-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
32 lines (32 loc) · 1.04 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module.exports = function(grunt) {
grunt.initConfig({
'npm-publish': {
options: {
abortIfDirty: true,
commit: false,
}
},
'bump': {
options: {
files: ['package.json'],
updateConfigs: [],
abortIfDirty: true,
commit: true,
commitMessage: 'bump: release v%VERSION%',
commitFiles: ['package.json'],
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'origin',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
metadata: '',
}
}
});
grunt.loadNpmTasks('grunt-npm');
grunt.loadNpmTasks('grunt-bump');
return grunt.registerTask('release', 'Bump the version and publish to NPM.', function(type) {
return grunt.task.run(['bump:' + (type || 'patch'), 'npm-publish']);
});
};