Skip to content

Commit a1b9812

Browse files
authored
Merge pull request #756 from basdelfos/vscode-tasks
Run app after debug build
2 parents 8278ba8 + d101039 commit a1b9812

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ apps/
1010
dist/
1111
debug/
1212
release/
13+
14+
# artefacts for Visual Studio Code
15+
/.vscode/

gulpfile.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,27 @@ function getPlatforms() {
6767
return platforms;
6868
}
6969

70+
function getRunDebugAppCommand() {
71+
switch (os.platform()) {
72+
case 'darwin':
73+
return 'open ' + path.join(debugDir, pkg.name, 'osx64', pkg.name + '.app');
74+
75+
break;
76+
case 'linux':
77+
return path.join(debugDir, pkg.name, 'linux64', pkg.name);
78+
79+
break;
80+
case 'win32':
81+
return path.join(debugDir, pkg.name, 'win32', pkg.name + '.exe');
82+
83+
break;
84+
85+
default:
86+
return '';
87+
break;
88+
}
89+
}
90+
7091
function get_release_filename(platform, ext) {
7192
return 'Betaflight-Configurator_' + platform + '_' + pkg.version + '.' + ext;
7293
}
@@ -275,6 +296,10 @@ gulp.task('debug', ['dist', 'clean-debug'], function (done) {
275296
process.exit(1);
276297
});
277298
}
299+
var exec = require('child_process').exec;
300+
var run = getRunDebugAppCommand();
301+
console.log('Starting debug app (' + run + ')...');
302+
exec(run);
278303
done();
279304
});
280305
});

0 commit comments

Comments
 (0)