Use exit codes on failures
This commit is contained in:
parent
5dab60ca0d
commit
5761e146c6
1 changed files with 3 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ const nodeVer = '';
|
||||||
const buildType = process.argv[2];
|
const buildType = process.argv[2];
|
||||||
if(!acceptableBuilds.includes(buildType)){
|
if(!acceptableBuilds.includes(buildType)){
|
||||||
console.error('[ERROR] unknown build type!');
|
console.error('[ERROR] unknown build type!');
|
||||||
process.exit();
|
process.exit(1);
|
||||||
}
|
}
|
||||||
await modulesCleanup('.');
|
await modulesCleanup('.');
|
||||||
if(!fs.existsSync(buildsDir)){
|
if(!fs.existsSync(buildsDir)){
|
||||||
|
|
@ -29,7 +29,7 @@ const nodeVer = '';
|
||||||
}
|
}
|
||||||
fs.mkdirSync(buildDir);
|
fs.mkdirSync(buildDir);
|
||||||
fs.mkdirSync(`${buildDir}/bin`);
|
fs.mkdirSync(`${buildDir}/bin`);
|
||||||
fs.mkdirSync(`${buildDir}/config`);
|
fs.mkdirSync(`${buildDir}/config`);
|
||||||
fs.mkdirSync(`${buildDir}/videos`);
|
fs.mkdirSync(`${buildDir}/videos`);
|
||||||
fs.mkdirSync(`${buildDir}/videos/_trash`);
|
fs.mkdirSync(`${buildDir}/videos/_trash`);
|
||||||
const buildConfig = {
|
const buildConfig = {
|
||||||
|
|
@ -47,7 +47,7 @@ const nodeVer = '';
|
||||||
}
|
}
|
||||||
catch(e){
|
catch(e){
|
||||||
console.log(e);
|
console.log(e);
|
||||||
process.exit();
|
process.exit(1);
|
||||||
}
|
}
|
||||||
fs.copySync('./bin/', `${buildDir}/bin/`);
|
fs.copySync('./bin/', `${buildDir}/bin/`);
|
||||||
fs.copySync('./config/bin-path.yml', `${buildDir}/config/bin-path.yml`);
|
fs.copySync('./config/bin-path.yml', `${buildDir}/config/bin-path.yml`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue