Created
April 19, 2022 17:29
-
-
Save ilaif/51dc2017e8282ddc6d1b36bc6cc4c441 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "veloctl-attach-worker", | |
"type": "shell", | |
"isBackground": false, | |
"command": "veloctl env develop -s worker -v --attach --env-file ${workspaceFolder}/.env.velocity", | |
"presentation": { | |
"echo": true, | |
"reveal": "silent", | |
"focus": false, | |
"panel": "shared", | |
"showReuseMessage": false, | |
"clear": true | |
} | |
}, | |
{ | |
"label": "veloctl-clean-env-file", | |
"type": "shell", | |
"isBackground": false, | |
"command": "rm -f ${workspaceFolder}/.env.velocity", | |
"presentation": { | |
"echo": false, | |
"reveal": "silent", | |
"focus": false, | |
"panel": "shared", | |
"showReuseMessage": true, | |
"clear": true | |
} | |
}, | |
{ | |
"label": "veloctl-develop", | |
"type": "shell", | |
"command": "veloctl env develop --service ${workspaceFolderBasename} -- dlv debug --headless=true --api-version=2 --listen=:2345 --output $(mktemp)", | |
"isBackground": true, | |
"runOptions": { | |
"instanceLimit": 1, | |
"reevaluateOnRerun": true, | |
}, | |
"problemMatcher": { | |
"owner": "custom", | |
"pattern": { | |
"regexp": "__________" | |
}, | |
"background": { | |
"activeOnStart": true, | |
"beginsPattern": "^Starting.*", | |
"endsPattern": "^API server listening at.*" | |
} | |
}, | |
"presentation": { | |
"echo": true, | |
"reveal": "always", | |
"focus": false, | |
"panel": "shared", | |
"showReuseMessage": true, | |
"clear": true | |
} | |
}, | |
{ | |
"label": "veloctl-kill", | |
"type": "shell", | |
"isBackground": true, | |
// Find the `output` from the run command and signal SIGINT | |
"command": "ps aux | grep \"veloctl env develop\" | grep ${workspaceFolderBasename} | grep -v grep | awk '{print $NF}' | xargs pkill -INT -f", | |
"runOptions": { | |
"instanceLimit": 1, | |
"reevaluateOnRerun": true, | |
}, | |
"presentation": { | |
"echo": true, | |
"reveal": "never", | |
"focus": false, | |
"panel": "shared", | |
"showReuseMessage": true, | |
"clear": true | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment