Skip to content
This repository was archived by the owner on Dec 22, 2024. It is now read-only.

Commit 98a896e

Browse files
Falvenhlovdal
authored andcommitted
Change postbuild to run on every build
Issue: Provide the option to run a script/command after every verify. microsoft#1266
1 parent 5c1af22 commit 98a896e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ The following settings are as per sketch settings of the Arduino extension. You
122122
- `output` - Arduino build output path. If not set, Arduino will create a new temporary output folder each time, which means it cannot reuse the intermediate result of the previous build leading to long verify/upload time, so it is recommended to set the field. Arduino requires that the output path should not be the workspace itself or in a subfolder of the workspace, otherwise, it may not work correctly. By default, this option is not set. It's worth noting that the contents of this file could be deleted during the build process, so pick (or create) a directory that will not store files you want to keep.
123123
- `debugger` - The short name of the debugger that will be used when the board itself does not have a debugger and there is more than one debugger available. You can find the list of debuggers [here](https://github.com/Microsoft/vscode-arduino/blob/master/misc/debuggerUsbMapping.json). By default, this option is not set.
124124
- `prebuild` - External command which will be invoked before any sketch build (verify, upload, ...). For details see the [Pre- and Post-Build Commands](#Pre--and-Post-Build-Commands) section.
125-
- `postbuild` - External command to be run after the sketch has been built successfully. See the afore mentioned section for more details.
125+
- `postbuild` - External command to be run after every sketch build. See the afore mentioned section for more details.
126126
- `intelliSenseGen` - Override the global setting for auto-generation of the IntelliSense configuration (i.e. `.vscode/c_cpp_properties.json`). Three options are available:
127127
- `"global"`: Use the global settings (default)
128128
- `"disable"`: Disable the auto-generation even if globally enabled

src/arduino/arduino.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -713,9 +713,7 @@ export class ArduinoApp {
713713

714714
const cleanup = async (result: "ok" | "error") => {
715715
let ret = true;
716-
if (result === "ok") {
717-
ret = await this.runPrePostBuildCommand(dc, env, "post");
718-
}
716+
ret = await this.runPrePostBuildCommand(dc, env, "post");
719717
await cocopa.conclude();
720718
if (buildMode === BuildMode.Upload || buildMode === BuildMode.UploadProgrammer) {
721719
UsbDetector.getInstance().resumeListening();

0 commit comments

Comments
 (0)