This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
executable file
·73 lines (55 loc) · 1.94 KB
/
gulpfile.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
72
73
const gulp = require('gulp');
const requireDir = require('require-dir');
const fs = require('fs');
const shell = require('gulp-shell')
require('os');
require('gulp');
requireDir('./Build/Tasks/', { recurse: true });
var xpath = require('xpath')
, dom = require('xmldom').DOMParser
process.env.RELEASE = "./Releases/"
process.env.DISKS = "./Game/"
// Set the path to the .csproj file
process.env.STAGING = process.env.RELEASE + "Source/"
// Set the path to the .csproj file
process.env.FINAL = process.env.RELEASE + "Final/"
// Set the path to the .csproj file
process.env.PROJECT = "./App/SpaceStation8.CoreDesktop.csproj"
var xml = fs.readFileSync(process.env.PROJECT, "utf8");
var xmlDoc = new dom().parseFromString(xml)
process.env.APP_NAME = xpath.select("string(//AssemblyName)", xmlDoc);
process.env.NAME_SPACE = xpath.select("string(//RootNamespace)", xmlDoc)
process.env.VERSION = xpath.select("string(//Version)", xmlDoc)
process.env.PLATFORMS = "osx-x64,win-x64,linux-x64";
process.env.CURRENT_PLATFORM = "";
process.env.BUILD_PATH = "";
process.env.SCRIPTS = "./Build/"
// Create the first round of tasks based on the platform list
var tasks = [];
for (let index = 0; index < process.env.PLATFORMS.split(",").length; index++) {
tasks.push('build');
if(index == 0) {
tasks.push('mac-bundle');
}
tasks.push('release');
}
gulp.task('runner-shared', function(cb)
{
process.env.CURRENT_PLATFORM = "shared";
process.env.TARGET_PLATFORM = "osx-x64";
cb();
}
)
gulp.task('reset-platforms', function(cb)
{
process.env.CURRENT_PLATFORM = "";
cb();
}
)
// Perform all of the builds and packages up each exe
gulp.task(
'package',
gulp.series( tasks )
);
// The default task just build the game locally which you can launch and debug
gulp.task('default', gulp.series([shell.task('dotnet build ' + process.env.PROJECT + ' -p:SelfContained=false -p:PublishSingleFile=false -p:GenerateFullPaths=true')]))