Migrate to go-version of update-gotools

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-02-20 23:15:10 +01:00
parent 7dafa5c0fc
commit 687a3ba947
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
2 changed files with 70 additions and 46 deletions

65
.config/gotools.yml Normal file
View file

@ -0,0 +1,65 @@
---
cwd: /home/luzifer
gopath: /home/luzifer/gocode
packages:
# Go-dev related tools
- name: github.com/alecthomas/gometalinter
- name: github.com/golang/dep/cmd/dep
- name: github.com/mailgun/godebug
- name: github.com/nsf/gocode
- name: github.com/shuLhan/go-bindata/...
- name: github.com/tools/godep
# Vault related tools
- name: github.com/hashicorp/vault
version: v0.9.3
- name: github.com/Luzifer/vault2env
- name: github.com/Luzifer/vault-patch
- name: github.com/Luzifer/vault-user-token
# Other tools
- name: github.com/fatih/hclfmt
- name: github.com/fiatjaf/jiq/cmd/jiq
- name: github.com/github/hub
- name: github.com/hashicorp/packer
- name: github.com/Luzifer/git-changerelease
- name: github.com/Luzifer/password
- name: github.com/Luzifer/share
- name: github.com/Luzifer/short_path
- name: github.com/Luzifer/slugify
- name: github.com/Luzifer/str2hex
- name: github.com/Luzifer/update-gotools
- name: github.com/Luzifer/worktime
- name: github.com/peco/peco/cmd/peco
version: v0.5.2
# Install dependencies for vim-go (May not run concurrently or will fail)
- { name: github.com/davidrjenni/reftools/cmd/fillstruct, single: true }
- { name: github.com/dominikh/go-tools/cmd/keyify, single: true }
- { name: github.com/fatih/gomodifytags, single: true }
- { name: github.com/fatih/motion, single: true }
- { name: github.com/golang/lint/golint, single: true }
- { name: github.com/jstemmer/gotags, single: true }
- { name: github.com/kisielk/errcheck, single: true }
- { name: github.com/klauspost/asmfmt/cmd/asmfmt, single: true }
- { name: github.com/rogpeppe/godef, single: true }
- { name: github.com/zmb3/gogetdoc, single: true }
- { name: golang.org/x/tools/cmd/goimports, single: true }
- { name: golang.org/x/tools/cmd/gorename, single: true }
- { name: golang.org/x/tools/cmd/guru, single: true }
- { name: github.com/josharian/impl, single: true }
# Ensure installed tools can work
post_commands:
- [/bin/bash, -c, "${GOPATH}/bin/gometalinter --install"]
pre_commands:
- [go, version]
- [/bin/bash, -c, "rm -rf ${GOPATH}"]
- [/bin/bash, -c, "mkdir -p ${GOPATH}"]
- [/bin/bash, -c, "touch ${GOPATH}/.gopath"]
...

View file

@ -1,52 +1,11 @@
#!/bin/bash #!/bin/bash
set -eux set -euxo pipefail
set -o pipefail
export GOPATH="${HOME}/gocode" export GOPATH="${HOME}/gocode"
INSTALLS=(
# Go-dev related tools
'github.com/alecthomas/gometalinter'
'github.com/golang/dep/cmd/dep'
'github.com/mailgun/godebug'
'github.com/nsf/gocode'
'github.com/shuLhan/go-bindata/...'
'github.com/tools/godep'
# Vault related tools if [ ! -e ${GOPATH}/bin/update-gotools ]; then
'github.com/hashicorp/vault' go get -v github.com/Luzifer/update-gotools
'github.com/Luzifer/vault2env' fi
'github.com/Luzifer/vault-patch'
'github.com/Luzifer/vault-user-token'
# Other tools
'github.com/fatih/hclfmt'
'github.com/fiatjaf/jiq/cmd/jiq'
'github.com/github/hub'
'github.com/hashicorp/packer'
'github.com/Luzifer/git-changerelease'
'github.com/Luzifer/password'
'github.com/Luzifer/share'
'github.com/Luzifer/short_path'
'github.com/Luzifer/slugify'
'github.com/Luzifer/str2hex'
'github.com/Luzifer/worktime'
'github.com/peco/peco/cmd/peco'
)
rm -rf ${GOPATH}
mkdir -p ${GOPATH}
# Create `.gopath` file for $PATH detection
touch ${GOPATH}/.gopath
for gp in ${INSTALLS[@]}; do
go get ${gp} &
done
wait
# Ensure installed tools can work
${GOPATH}/bin/gometalinter --install --update
vim +:GoInstallBinaries +:qall
exec ${GOPATH}/bin/update-gotools "$@"