-
Notifications
You must be signed in to change notification settings - Fork 32
/
Gruntfile.js
41 lines (32 loc) · 1.03 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
module.exports = function (grunt) {
var path = require('path');
// Load the package JSON file
var pkg = grunt.file.readJSON('package.json');
// Load information about the assembly
var assembly = grunt.file.readJSON('src/Skybrud.Social.Core/Properties/AssemblyInfo.json');
// Get the version of the package
var version = assembly.informationalVersion ? assembly.informationalVersion : assembly.version;
grunt.initConfig({
pkg: pkg,
zip: {
release: {
router: function (filepath) {
if (filepath.indexOf('/bin/Release/') >= 0) {
return filepath.split('/bin/Release/')[1];
} else {
return path.basename(filepath);
}
},
src: [
'src/Skybrud.Social.Core/bin/Release/*/*.dll',
'src/Skybrud.Social.Core/bin/Release/*/*.xml',
'src/LICENSE.html'
],
dest: 'releases/github/Skybrud.Social.Core.v' + version + '.zip'
}
}
});
grunt.loadNpmTasks('grunt-zip');
grunt.registerTask('release', ['zip']);
grunt.registerTask('default', ['release']);
};