Run app after debug build

10.3.x-maintenance
Bas Delfos 2017-12-03 21:18:03 +01:00
parent 8278ba83a4
commit d101039e45
2 changed files with 28 additions and 0 deletions

3
.gitignore vendored
View File

@ -10,3 +10,6 @@ apps/
dist/
debug/
release/
# artefacts for Visual Studio Code
/.vscode/

View File

@ -67,6 +67,27 @@ function getPlatforms() {
return platforms;
}
function getRunDebugAppCommand() {
switch (os.platform()) {
case 'darwin':
return 'open ' + path.join(debugDir, pkg.name, 'osx64', pkg.name + '.app');
break;
case 'linux':
return path.join(debugDir, pkg.name, 'linux64', pkg.name);
break;
case 'win32':
return path.join(debugDir, pkg.name, 'win32', pkg.name + '.exe');
break;
default:
return '';
break;
}
}
function get_release_filename(platform, ext) {
return 'Betaflight-Configurator_' + platform + '_' + pkg.version + '.' + ext;
}
@ -275,6 +296,10 @@ gulp.task('debug', ['dist', 'clean-debug'], function (done) {
process.exit(1);
});
}
var exec = require('child_process').exec;
var run = getRunDebugAppCommand();
console.log('Starting debug app (' + run + ')...');
exec(run);
done();
});
});