feat: install dev env tools correctly

This commit is contained in:
Jose Diaz-Gonzalez
2022-11-08 23:53:25 -05:00
parent f02f19652e
commit ab9e2b101e
2 changed files with 20 additions and 3 deletions

View File

@@ -1,7 +1,11 @@
#!/usr/bin/env bash
main() {
declare PLUGIN_NAME="$1"
install-go-devtools() {
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"
export GO111MODULE=off
@@ -22,4 +26,17 @@ main() {
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 "$@"

View File

@@ -19,7 +19,7 @@
"source=${localWorkspaceFolder}/tmp/data/,target=/mnt/dokku/,type=bind"
],
"overrideCommand": false,
"postCreateCommand": "download-go-mod && make setup-deploy-tests",
"postCreateCommand": "setup-dev-env",
"runArgs": ["--init"],
"workspaceFolder": "/root/go/src/github.com/dokku/dokku",
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/go/src/github.com/dokku/dokku,consistency=cached"