basic vscode tasks (start, build only for win)
This commit is contained in:
parent
1c5c9de7dc
commit
5c3082f410
37
.vscode/tasks-scripts/start.bat
vendored
Normal file
37
.vscode/tasks-scripts/start.bat
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
@echo off
|
||||
|
||||
set root=%~dp0..\..
|
||||
|
||||
@REM if "%2%"=="Local" goto onLocal
|
||||
@REM if "%2%"=="Docker" goto onDocker
|
||||
|
||||
|
||||
@REM :onLocal
|
||||
if "%1%"=="Start" goto onStartLocal
|
||||
if "%1%"=="Restart" goto onRestartLocal
|
||||
if "%1%"=="Stop" goto onStopLocal
|
||||
|
||||
:onStartLocal
|
||||
"%root%\\build\\start\start.bat" start
|
||||
|
||||
:onRestartLocal
|
||||
"%root%\\build\\start\\restart.bat" start
|
||||
|
||||
:onStopLocal
|
||||
"%root%\\build\\start\\stop.bat" start
|
||||
|
||||
|
||||
@REM :onDocker
|
||||
@REM if "%1%"=="Start" goto onStartDocker
|
||||
@REM if "%1%"=="Restart" goto onRestartDocker
|
||||
@REM if "%1%"=="Stop" goto onStopDocker
|
||||
|
||||
@REM :onStartDocker
|
||||
@REM echo "Start docker"
|
||||
@REM "%root%\\build\\start\start.backend.docker.bat" start
|
||||
|
||||
@REM :onRestartDocker
|
||||
@REM "%root%\\build\\start\\restart.backend.docker.bat" start
|
||||
|
||||
@REM :onStopDocker
|
||||
@REM "%root%\\build\\start\\stop.backend.docker.bat" start
|
12
.vscode/tasks-scripts/start.sh
vendored
Normal file
12
.vscode/tasks-scripts/start.sh
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
scriptLocation=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
root=$(builtin cd $scriptLocation/../../; pwd)
|
||||
|
||||
if [ "$1" = "Start" ]
|
||||
then (cd $root/build/start && sh ./start.backend.docker.sh)
|
||||
elif [ "$1" = "Restart" ]
|
||||
then (cd $root/build/start && sh ./restart.backend.docker.sh)
|
||||
elif [ "$1" = "Stop" ]
|
||||
then (cd $root/build/start && sh ./stop.backend.docker.sh)
|
||||
fi
|
57
.vscode/tasks.json
vendored
Normal file
57
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"problemMatcher": [],
|
||||
"presentation": {
|
||||
"focus": true,
|
||||
"close": true
|
||||
},
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Start",
|
||||
"type": "shell",
|
||||
"command": "tasks-scripts\\start.sh ${input:start-param}",
|
||||
"windows": {
|
||||
"command": "${workspaceFolder}\\.vscode\\tasks-scripts\\start.bat ${input:start-param}"
|
||||
// "command": "${workspaceFolder}\\.vscode\\tasks-scripts\\start.bat ${input:start-param} ${input:local-docker}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Build",
|
||||
"type": "shell",
|
||||
"command": "${workspaceFolder}\\build\\build.sh",
|
||||
"windows": {
|
||||
"command": "${workspaceFolder}\\build\\build.bat"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Frontend",
|
||||
"type": "shell",
|
||||
"command": "yarn start"
|
||||
}
|
||||
|
||||
// {
|
||||
// "label": "Migrate",
|
||||
// "type": "shell",
|
||||
// "command": "${workspaceFolder}\\build\\runMigrations.sh",
|
||||
// "windows": {
|
||||
// "command": "${workspaceFolder}\\build\\runMigrations.bat"
|
||||
// }
|
||||
// }
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "start-param",
|
||||
"description": "Command",
|
||||
"default": "Start",
|
||||
"type": "pickString",
|
||||
"options": ["Start", "Restart", "Stop"]
|
||||
},
|
||||
{
|
||||
"id": "local-docker",
|
||||
"description": "Manipulation",
|
||||
"default": "Local",
|
||||
"type": "pickString",
|
||||
"options": ["Local", "Docker"]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user