forked from Tim-Pohlmann/Screeps-Nooby-Guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
46 lines (39 loc) · 1.1 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
module.exports = function(grunt) {
var config = require('./.screeps.json');
var branch = grunt.option('branch') || config.branch;
var email = grunt.option('email') || config.email;
var token = grunt.option('token') || config.token;
var ptr = grunt.option('ptr') ? true: config.ptr;
grunt.loadNpmTasks('grunt-screeps');
grunt.loadNpmTasks('grunt-file-append');
var currentDate = new Date();
// output current date and branch
grunt.log.subhead('Task Start: ' + currentDate.toLocaleDateString());
grunt.log.writeln('Branch: ' + branch);
grunt.initConfig({
screeps: {
options: {
email: email,
token: token,
branch: branch,
ptr: ptr
//server: 'season'
},
dist: {
src: ['src/*.js']
}
},
// Add Version information
file_append: {
versioning: {
files:[
{
append: "\nglobal.SCRIPT_VERSION = " + currentDate.getTime() + "\n",
input: 'src/version.js'
}
]
}
}
})
grunt.registerTask('default', ['file_append:versioning', 'screeps']);
}