2019-12-10 23:44:49 +03:00
|
|
|
const parseArgs = require('minimist')
|
2019-08-20 00:09:29 +03:00
|
|
|
|
|
|
|
const argv = parseArgs(process.argv.slice(2), {
|
|
|
|
alias: {
|
|
|
|
h: 'help',
|
2020-03-06 18:22:38 +03:00
|
|
|
d: 'debug',
|
|
|
|
t: 'target'
|
2019-08-20 00:09:29 +03:00
|
|
|
},
|
|
|
|
boolean: ['h', 'd']
|
|
|
|
})
|
|
|
|
|
|
|
|
if (argv.help) {
|
|
|
|
console.log(`
|
|
|
|
Description
|
|
|
|
Tauri build.
|
|
|
|
Usage
|
|
|
|
$ tauri build
|
|
|
|
Options
|
|
|
|
--help, -h Displays this message
|
2020-03-06 18:22:38 +03:00
|
|
|
--debug, -d Builds with the debug flag
|
|
|
|
--target, -t Comma-separated list of target triples to build against
|
2019-08-20 00:09:29 +03:00
|
|
|
`)
|
|
|
|
process.exit(0)
|
|
|
|
}
|
|
|
|
|
2020-03-30 05:41:45 +03:00
|
|
|
async function run () {
|
|
|
|
const build = require('../dist/api/build')
|
2019-08-20 00:09:29 +03:00
|
|
|
|
2020-03-30 05:41:45 +03:00
|
|
|
await build({
|
|
|
|
ctx: {
|
|
|
|
debug: argv.debug,
|
|
|
|
target: argv.target
|
|
|
|
}
|
|
|
|
}).promise
|
|
|
|
}
|
|
|
|
|
|
|
|
run()
|