GT2/GT2-iOS/node_modules/auth0/scripts/cleanup.js

22 lines
519 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
if (process.platform === 'win32') {
console.error('Must be run on a Unix OS');
process.exit(1);
}
var execSync = require('child_process').execSync;
var fs = require('fs');
if (fs.existsSync('out')) {
execSync(`rm -r out`, {stdio: 'inherit'});
}
if (!fs.existsSync('.release')) {
console.log('No in progress release found');
process.exit(0);
}
var tmp = fs.readFileSync('.release');
if (fs.existsSync(tmp)) {
execSync(`rm -r ${tmp}`, {stdio: 'inherit'});
}
execSync(`rm -r .release`, {stdio: 'inherit'});