I am setting up a build process which incorporates bash scripts already defined as a first-step into using tasks.json in my builds. Scripts must be run in order and it is essential that they run in sequence and not parallel since subsequent scripts depend on the output of the previous ones.
Setting "dependsOrder": "sequence"
is ensuring the scripts are run in order, but there is an overlap such that the second script is being called before the first script is called and so on; ie: they are still running in parallel.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"label": "pageBuilder",
"tasks": [
{
"label": "build",
"group": {
"kind": "build",
"isDefault": true
},
"dependsOrder": "sequence",
"dependsOn": [
"buildCorePages", "convertMarkdownToHtml", "buildArticles"
],
"problemMatcher": "$gcc"
},
{
"label": "convertMarkdownToHtml",
"type": "shell",
"command": "${workspaceRoot}\\build_scripts\\convertMarkdownToHtml.sh"
},
{
"label": "buildCorePages",
"type": "shell",
"command": "${workspaceRoot}\\build_scripts\\buildCorePages.sh"
},
{
"label": "buildArticles",
"type": "shell",
"command": "${workspaceRoot}\\build_scripts\\buildArticles.sh"
}
]
}
How can I force a wait for script completion?