slaventius 2 years ago
parent 2721fb7104
commit c4bb7fc554
  1. 4
      .vscode/extensions.json
  2. 49
      .vscode/tasks.json

@ -1,5 +1,3 @@
{
"recommendations": [
"johnpapa.vscode-peacock"
]
"recommendations": ["johnpapa.vscode-peacock"]
}

49
.vscode/tasks.json vendored

@ -1,10 +1,8 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build linux",
"label": "build",
"type": "shell",
"group": {
"kind": "build",
@ -17,22 +15,22 @@
"options": {
"cwd": "${workspaceRoot}",
"env": {
"APP": "pakitara",
"APP": "authDBService",
"GOOS": "linux",
"GOARCH": "amd64",
"GOBIN": "${env:GOPATH}/bin"
},
"args": [
"ldflags '-s -w'"
]
"args": ["ldflags '-s -w'"]
},
"command": "go build -o $GOBIN/$APP-$GOOS-$GOARCH -ldflags \"-s -w\" $APP.go",
"command": "go build -o $GOBIN/$APP-$GOOS-$GOARCH -ldflags \"-s -w\" ./cmd/main.go",
"problemMatcher": []
},
{
"label": "build windows",
"label": "docker-build",
"type": "shell",
"group": "build",
"group": {
"kind": "build"
},
"presentation": {
"echo": true,
"panel": "new"
@ -40,16 +38,31 @@
"options": {
"cwd": "${workspaceRoot}",
"env": {
"APP": "pakitara",
"GOOS": "windows",
"GOARCH": "amd64",
"GOBIN": "${env:GOPATH}/bin"
"TAG": "slaventius/test3k_auth_db:latest"
},
"args": [
"ldflags '-s -w'"
]
"args": ["--no-cache", "--tag $TAG"]
},
"command": "sudo docker build --no-cache --tag $TAG ./build/",
"problemMatcher": []
},
{
"label": "docker-push",
"type": "shell",
"group": {
"kind": "build"
},
"presentation": {
"echo": true,
"panel": "new"
},
"command": "go build -o $GOBIN\\$APP-$GOOS-$GOARCH.exe -ldflags \"-s -w\" $APP.go"
"options": {
"cwd": "${workspaceRoot}",
"env": {
"TAG": "slaventius/test3k_auth_db:latest"
}
},
"command": "sudo docker push $TAG",
"problemMatcher": []
}
]
}
Loading…
Cancel
Save