-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.js
44 lines (32 loc) · 1 KB
/
build.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
var bt = require('./BuildTools/buildTools.js')
// Used for generation version.* files
bt.options.companyName = "Topten Software";
// Load version info
bt.version();
if (bt.options.official)
{
// Check everything committed
bt.git_check();
// Clock version
bt.clock_version();
// Force clean
bt.options.clean = true;
bt.clean("./Build");
}
// Build
bt.dnbuild("Release", "yaza");
bt.dnbuild("Release", "yazd");
// Pack
bt.dnpack("Release", "yaza", "netcoreapp2.1");
bt.dnpack("Release", "yazd", "netcoreapp2.1");
// Update zips
bt.run("zip", ["yaza.zip", "./Build/Release/yaza/net46/yaza.exe"]);
bt.run("zip", ["yazd.zip", "./Build/Release/yazd/net46/yazd.exe"]);
if (bt.options.official)
{
// Tag and commit
bt.git_tag();
// Push nuget packages
bt.nupush(`./build/Release/yaza/*.${bt.options.version.build}.nupkg`, `https://api.nuget.org/v3/index.json`);
bt.nupush(`./build/Release/yazd/*.${bt.options.version.build}.nupkg`, `https://api.nuget.org/v3/index.json`);
}