forked from steveukx/git-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GruntFile.js
64 lines (53 loc) · 1.67 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
nodeunit: {
unit: ['test/unit/test*.js'],
integration: ['test/integration/test*.js']
},
release: {
options: {
file: 'package.json',
tagName: '<%= version %>', //default: '<%= version %>'
commitMessage: 'Release <%= version %>', //default: 'release <%= version %>'
tagMessage: 'Tag version <%= version %>' //default: 'Version <%= version %>'
}
},
clean: {
typings: {
src: [
'*.d.ts',
'*/**.d.ts',
'!typings/**/*.d.ts',
'!node_modules/**.*'
]
}
},
copy: {
typings: {
files: [
{expand: true, cwd: './typings', src: ['./**'], dest: '.'}
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.loadNpmTasks('grunt-release-steps');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('-to-npm', ['copy:typings', 'release:npm', 'clean:typings']);
grunt.registerTask('-to-git', ['release:add:commit:push']);
grunt.registerTask('-tag', ['release:tag:pushTags']);
'patch minor major'.split(' ').forEach(function (type) {
grunt.registerTask(type, [
'clean',
'test',
'release:bump:' + type, '-tag',
'-to-git',
'-to-npm'
]);
});
grunt.registerTask('default', ['patch']);
grunt.registerTask('test', ['nodeunit:unit', 'nodeunit:integration']);
};