forked from geddski/grunt-release
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
67 lines (63 loc) · 1.51 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
65
66
67
module.exports = function(grunt) {
grunt.initConfig({
bump: true,
file: 'package.json',
files: [],
changelog: false,
add: true,
commit: true,
tag: true,
push: true,
pushTags: true,
npm: true,
npmtag: false,
clean: {
test: 'test/fixtures/_component.json'
},
nodeunit: {
tests: 'test/release_test.js'
},
release: {
options: {
bump: '<%= bump %>',
file: '<%= file %>',
files: '<%= files %>',
changelog: '<%= changelog %>',
add: '<%= add %>',
commit: '<%= commit %>',
tag: '<%= tag %>',
push: '<%= push %>',
pushTags: '<%= pushTags %>',
npm: '<%= npm %>',
npmtag: '<%= npmtag %>'
}
},
setup: {
test: {
src: 'test/fixtures/component.json',
dest: 'test/fixtures/_component.json'
}
}
});
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-nodeunit');
grunt.registerTask('test', [
'clean',
'setup',
'release',
'nodeunit',
'clean'
]);
grunt.registerMultiTask('setup', 'Setup test fixtures', function(){
this.files.forEach(function(f){
grunt.file.copy(f.src, f.dest);
});
grunt.config.set('file', 'test/fixtures/_component.json');
grunt.config.set('add', false);
grunt.config.set('commit', false);
grunt.config.set('tag', false);
grunt.config.set('pushTags', false);
grunt.config.set('npm', false);
});
};