I am using vscode on Windows to Verify / Upload images, I wish to add a pre-build task (UpdateVer) to update the software version using a small powershell script, I have added a section into tasks with a dependsOn dependency but I cannot get it to run - I have added a simpler task (called pre-build) to check things and this also does not run.
Where am I going wrong please?
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "UpdateVer",
"detail": "Update the FIRMWARE_VERSION",
"type": "shell",
"command": "./../scripts/updateversion.ps1",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
},
{
"label": "pre-build",
"type": "shell",
"command": "git describe --long > '${workspaceFolder}/version.txt'"
},
{
"label": "build",
"type": "shell",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:build",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"dependsOn": ["pre-build", "UpdateVer"],
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "silent"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile",
}
]
}