forked from excaliburjs/Excalibur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntFile.js
68 lines (61 loc) · 1.52 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
/*********************************
/* Excalibur.js Grunt Build File
/*********************************/
const version = require('./version').getCiVersion();
/*global module:false*/
module.exports = function (grunt) {
//
// Project configuration
//
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
version: version,
//
// Distribution repository build control
//
buildcontrol: {
options: {
dir: 'build',
commit: true,
push: true,
message: ':shipit: Built excaliburjs/Excalibur@%sourceCommit% on branch %sourceBranch%',
config: {
'user.name': 'Travis-CI',
'user.email': '[email protected]'
}
},
// continuous integration dists
dist: {
options: {
branch: 'main',
remote: 'https://github.com/excaliburjs/excalibur-dist',
login: 'kamranayub',
token: process.env.GH_DIST_TOKEN,
fetchProgress: false
}
}
},
//
// Package.json version bumper
//
bumpup: {
setters: {
// Overrides version setter
version: function (old, releaseType, options) {
return version;
}
},
files: ['build/package.json']
}
});
//
// Load NPM Grunt tasks as dependencies
//
grunt.loadNpmTasks('grunt-build-control');
grunt.loadNpmTasks('grunt-bumpup');
//
// Register available Grunt tasks
//
// CI task to deploy dists
grunt.registerTask('dists', ['bumpup', 'buildcontrol']);
};