forked from DuckieTV/duckietv-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
duckietv-builder-package-binaries.js
executable file
·41 lines (33 loc) · 1.21 KB
/
duckietv-builder-package-binaries.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
#!/usr/bin/env node
require('shelljs/global');
var program = require('commander'),
sharedConfig = require('./shared');
config.verbose = false;
config.fatal = true;
/**
* Package binaries
* - package binaries to their respective packaging tgz format
* - move them to the binaries output dir
*/
program
.description('package binaries to their respective packaging tgz format, move them to the binaries output dir')
.option("-p, --platform [platforms]", "Build a specific platform (defaults to all: " + sharedConfig.platforms.join(","), function(val) {
return val.toLowerCase().split(',');
}, sharedConfig.platforms)
.option("-n, --nightly", "do a nightly (version number set to today)")
.parse(process.argv);
sharedConfig.validateRequestedPlatforms(program.platform);
/**
* Build process
*/
echo("Packaging binaries");
/**
* For each supported platform, run the preProcessor that does platform-specific things.
*/
program.platform.map(function(platform) {
echo("Running packager processor for " + platform);
var processor = require('./platforms/' + platform).processor;
processor.packageBinary(program);
echo("Done processing " + platform);
});
echo("Package processor done");