Save files before starting AutoBuild (#13649)

This commit is contained in:
ManuelMcLure 2019-04-12 10:33:16 -07:00 committed by Scott Lahteine
parent 64ee064ded
commit 8bc5817559

View file

@ -8,6 +8,7 @@ function activate(context) {
var NEXT_TERM_ID = 1; var NEXT_TERM_ID = 1;
var pio_build = vscode.commands.registerCommand('piobuild', function () { var pio_build = vscode.commands.registerCommand('piobuild', function () {
vscode.commands.executeCommand('workbench.action.files.saveAll');
const terminal = vscode.window.createTerminal(`AB Build #${NEXT_TERM_ID++}`); const terminal = vscode.window.createTerminal(`AB Build #${NEXT_TERM_ID++}`);
terminal.show(true); terminal.show(true);
terminal.sendText("python buildroot/share/atom/auto_build.py build"); terminal.sendText("python buildroot/share/atom/auto_build.py build");
@ -18,11 +19,13 @@ function activate(context) {
terminal.sendText("python buildroot/share/atom/auto_build.py clean"); terminal.sendText("python buildroot/share/atom/auto_build.py clean");
}); });
var pio_upload = vscode.commands.registerCommand('pioupload', function () { var pio_upload = vscode.commands.registerCommand('pioupload', function () {
vscode.commands.executeCommand('workbench.action.files.saveAll');
const terminal = vscode.window.createTerminal(`AB Upload #${NEXT_TERM_ID++}`); const terminal = vscode.window.createTerminal(`AB Upload #${NEXT_TERM_ID++}`);
terminal.show(true); terminal.show(true);
terminal.sendText("python buildroot/share/atom/auto_build.py upload"); terminal.sendText("python buildroot/share/atom/auto_build.py upload");
}); });
var pio_traceback = vscode.commands.registerCommand('piotraceback', function () { var pio_traceback = vscode.commands.registerCommand('piotraceback', function () {
vscode.commands.executeCommand('workbench.action.files.saveAll');
const terminal = vscode.window.createTerminal(`AB Traceback #${NEXT_TERM_ID++}`); const terminal = vscode.window.createTerminal(`AB Traceback #${NEXT_TERM_ID++}`);
terminal.show(true); terminal.show(true);
terminal.sendText("python buildroot/share/atom/auto_build.py traceback"); terminal.sendText("python buildroot/share/atom/auto_build.py traceback");