Skip to content

Instantly share code, notes, and snippets.

@ilaif
Created April 19, 2022 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ilaif/51dc2017e8282ddc6d1b36bc6cc4c441 to your computer and use it in GitHub Desktop.
Save ilaif/51dc2017e8282ddc6d1b36bc6cc4c441 to your computer and use it in GitHub Desktop.
{
"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