-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
executable file
·39 lines (33 loc) · 938 Bytes
/
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
33
34
35
36
37
38
39
/*jshint node: true, browser: false */
module.exports = function (grunt) {
'use strict';
// Load all installed plugins
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bump: {
options: {
files: ['package.json', 'bower.json'],
updateConfigs: ['pkg'],
commit: true,
commitMessage: 'Version %VERSION%',
commitFiles: ['package.json', 'bower.json'],
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'origin'
}
}
});
// Tasks
grunt.registerTask('release', function (bump) {
// If no 'bump' argument was provided, set it to 'patch'
if (arguments.length === 0) {
bump = 'patch';
}
// Bump the appropriate version piece, build the dist folder, and commit it all up
grunt.task.run('bump-only:' + bump, 'bump-commit');
});
};