feat: install dev env tools correctly
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
main() {
|
install-go-devtools() {
|
||||||
declare PLUGIN_NAME="$1"
|
go install github.com/go-delve/delve/cmd/dlv@latest
|
||||||
|
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||||
|
}
|
||||||
|
|
||||||
|
install-go-mods() {
|
||||||
local plugin_root="/root/go/src/github.com/dokku/dokku/plugins"
|
local plugin_root="/root/go/src/github.com/dokku/dokku/plugins"
|
||||||
|
|
||||||
export GO111MODULE=off
|
export GO111MODULE=off
|
||||||
@@ -22,4 +26,17 @@ main() {
|
|||||||
popd >/dev/null || true
|
popd >/dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup-ci() {
|
||||||
|
local dokku_root="/root/go/src/github.com/dokku/dokku"
|
||||||
|
pushd "$plugin_root" >/dev/null || true
|
||||||
|
make ci-dependencies setup-deploy-tests
|
||||||
|
popd >/dev/null || true
|
||||||
|
}
|
||||||
|
|
||||||
|
main () {
|
||||||
|
install-go-mods
|
||||||
|
install-go-devtools
|
||||||
|
setup-ci
|
||||||
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
"source=${localWorkspaceFolder}/tmp/data/,target=/mnt/dokku/,type=bind"
|
"source=${localWorkspaceFolder}/tmp/data/,target=/mnt/dokku/,type=bind"
|
||||||
],
|
],
|
||||||
"overrideCommand": false,
|
"overrideCommand": false,
|
||||||
"postCreateCommand": "download-go-mod && make setup-deploy-tests",
|
"postCreateCommand": "setup-dev-env",
|
||||||
"runArgs": ["--init"],
|
"runArgs": ["--init"],
|
||||||
"workspaceFolder": "/root/go/src/github.com/dokku/dokku",
|
"workspaceFolder": "/root/go/src/github.com/dokku/dokku",
|
||||||
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/go/src/github.com/dokku/dokku,consistency=cached"
|
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/go/src/github.com/dokku/dokku,consistency=cached"
|
||||||
|
|||||||
Reference in New Issue
Block a user