Akos Kitta 6f584bf5d6 Fixed the electron build.
- Switched from `grpc` to `@grpc/grpc-js`.
 - Use electron `4.x` due to `@grpc/grpc-js`.
 - Enabled the build on Azure Pipelines.
 - From now on, the TS/JS generation is manual.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
2019-05-08 22:31:09 +02:00

34 lines
1.2 KiB
JavaScript
Executable File

#!/usr/bin/env node
// @ts-check
const { versionInfo } = require('./utils');
const yargs = require('yargs');
(() => {
yargs
.command({
command: 'name',
describe: 'Returns with the application name we build. The name includes the full application name with the version, the platform and the file extension.',
handler: () => {
const { platform } = process;
let ext = undefined;
let os = undefined;
if (platform === 'darwin') {
ext = 'dmg';
os = 'mac';
} else if (platform === 'win32') {
ext = 'zip';
os = 'win';
} else if (platform === 'linux') {
ext = 'tar.xz';
os = 'linux';
} else {
process.stderr.write(`Unexpected platform: ${platform}.`);
process.exit(1);
}
process.stdout.write(`Arduino-PoC-${versionInfo().version}-${os}.${ext}`);
process.exit(0);
}
})
.demandCommand(1)
.argv;
})();