Browse Source

Save files before starting AutoBuild (#13649)

ManuelMcLure 6 years ago
parent
commit
8bc5817559
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      buildroot/share/vscode/AutoBuildMarlin/extension.js

+ 3
- 0
buildroot/share/vscode/AutoBuildMarlin/extension.js View File

8
 
8
 
9
   var NEXT_TERM_ID = 1;
9
   var NEXT_TERM_ID = 1;
10
   var pio_build     = vscode.commands.registerCommand('piobuild',     function () {
10
   var pio_build     = vscode.commands.registerCommand('piobuild',     function () {
11
+    vscode.commands.executeCommand('workbench.action.files.saveAll');
11
     const terminal = vscode.window.createTerminal(`AB Build #${NEXT_TERM_ID++}`);
12
     const terminal = vscode.window.createTerminal(`AB Build #${NEXT_TERM_ID++}`);
12
     terminal.show(true);
13
     terminal.show(true);
13
     terminal.sendText("python buildroot/share/atom/auto_build.py build");
14
     terminal.sendText("python buildroot/share/atom/auto_build.py build");
18
     terminal.sendText("python buildroot/share/atom/auto_build.py clean");
19
     terminal.sendText("python buildroot/share/atom/auto_build.py clean");
19
   });
20
   });
20
   var pio_upload    = vscode.commands.registerCommand('pioupload',    function () {
21
   var pio_upload    = vscode.commands.registerCommand('pioupload',    function () {
22
+    vscode.commands.executeCommand('workbench.action.files.saveAll');
21
     const terminal = vscode.window.createTerminal(`AB Upload #${NEXT_TERM_ID++}`);
23
     const terminal = vscode.window.createTerminal(`AB Upload #${NEXT_TERM_ID++}`);
22
     terminal.show(true);
24
     terminal.show(true);
23
     terminal.sendText("python buildroot/share/atom/auto_build.py upload");
25
     terminal.sendText("python buildroot/share/atom/auto_build.py upload");
24
   });
26
   });
25
   var pio_traceback = vscode.commands.registerCommand('piotraceback', function () {
27
   var pio_traceback = vscode.commands.registerCommand('piotraceback', function () {
28
+    vscode.commands.executeCommand('workbench.action.files.saveAll');
26
     const terminal = vscode.window.createTerminal(`AB Traceback #${NEXT_TERM_ID++}`);
29
     const terminal = vscode.window.createTerminal(`AB Traceback #${NEXT_TERM_ID++}`);
27
     terminal.show(true);
30
     terminal.show(true);
28
     terminal.sendText("python buildroot/share/atom/auto_build.py traceback");
31
     terminal.sendText("python buildroot/share/atom/auto_build.py traceback");

Loading…
Cancel
Save