-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
71 lines (65 loc) · 1.9 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
68
69
70
71
/**
* Grunt file for the ZigBeeSiteSurvey
*
* Create a new bugfix version (x.y.++):
* grunt v:patch
*
* Create a new feature version (x.++.0)
* grunt v:minor
*
* Create a new major version (++.0.0)
* grunt v:major
*
* Create ZIP File with distribution (only intended for Windows releases)
* grunt compress
*
* Created by kc on 27.06.15.
*/
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bump: {
options: {
files: ['package.json'],
updateConfigs: [],
commit: true,
commitMessage: 'New version added v%VERSION%',
commitFiles: ['-a'],
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'git@github.com:ancasicolica/ZigBeeSiteSurvey.git',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
globalReplace: false,
prereleaseName: false,
regExp: false
}
},
zip: {
'make': {
src: ['./**/**'],
dest: '../ZigBeeSiteSurvey_x.y.z_OS_.zip',
compression: 'DEFLATE'
}
},
compress: {
main: {
options: {
archive: 'dist/ZigBeeSiteSurvey-' + grunt.file.readJSON('package.json').version + '-Win-x64.zip'
},
files: [{
src: ['*.js', 'LICENSE', '*.json', 'node.exe', '*.md', 'lib/**', 'node_modules/**', 'web/**', 'bin/**'],
dest: 'ZigBeeSiteSurvey-' + grunt.file.readJSON('package.json').version + '-Win-x64'
}]
}
}
});
grunt.loadNpmTasks('grunt-bump');
grunt.loadNpmTasks('grunt-zip');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('minify', ['concat', 'uglify:js']);
grunt.registerTask('v:patch', ['bump:patch']);
grunt.registerTask('v:minor', ['bump:minor']);
grunt.registerTask('v:major', ['bump:major']);
grunt.registerTask('make', ['zip:make']);
};