From af55c04e362818c69b91801d8a4101095522eda4 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Wed, 24 Mar 2021 13:08:41 +0000 Subject: [PATCH] .vscode/tasks.json: Implement tasks for Windows Change-Id: I67a55990edcffe3c8f79fddd6c26b51216a80995 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45763 Reviewed-by: Corentin Wallez Commit-Queue: Ben Clayton --- .vscode/tasks.json | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 5094949f74..03599a8c3c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -33,6 +33,13 @@ "ninja && echo Done" ], }, + "windows": { + "command": "cmd", + "args": [ + "/C", + "ninja && echo Done" + ], + }, "options": { "cwd": "${workspaceRoot}/out/active", }, @@ -78,12 +85,19 @@ "gn gen 'out/${input:buildType}' --args=is_debug=$(if [ '${input:buildType}' = 'Debug' ]; then echo 'true'; else echo 'false'; fi) && (rm -fr out/active || true) && ln -s ${input:buildType} out/active", ], }, + "windows": { + "command": "cmd", + "args": [ + "/C", + "(IF \"${input:buildType}\" == \"Debug\" ( gn gen 'out\\${input:buildType}' --args=is_debug=true ) ELSE ( gn gen 'out\\${input:buildType}' --args=is_debug=false )) && (IF EXIST 'out\\active' rmdir 'out\\active' /q /s) && (mklink /j 'out\\active' 'out\\${input:buildType}')", + ], + }, "options": { "cwd": "${workspaceRoot}" }, "problemMatcher": [], }, - // Rebases the current branch on to out origin/main and then calls + // Rebases the current branch on to origin/main and then calls // `gclient sync`. { "label": "sync", @@ -92,14 +106,21 @@ "command": "sh", "args": [ "-c", - "git fetch origin && git rebase origin/main && gclient sync" + "git fetch origin && git rebase origin/main && gclient sync && echo Done" ], }, "osx": { "command": "sh", "args": [ "-c", - "git fetch origin && git rebase origin/main && gclient sync" + "git fetch origin && git rebase origin/main && gclient sync && echo Done" + ], + }, + "windows": { + "command": "cmd", + "args": [ + "/C", + "git fetch origin && git rebase origin/main && gclient sync && echo Done" ], }, "options": { @@ -135,4 +156,4 @@ "description": "The type of build", }, ] -} +} \ No newline at end of file