-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-go
executable file
·43 lines (31 loc) · 1.12 KB
/
install-go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
set -e
echo "Installing Go programs"
go version
# install our own go utilities from the go folder
dir=$(dirname $0)
cd $dir
for dir in $dir/go/*/; do
echo "Installing $dir"
cd $dir
go install .
cd ..
done
# Install commonly used go utilities that live elsewhere
export PATH=/usr/local/go/bin:$PATH
echo "Installing gopls"
go install golang.org/x/tools/gopls@latest
echo "Installing golang-migrate"
# https://github.com/golang-migrate/migrate/blob/master/cmd/migrate/README.md
go install -tags 'sqlite' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
echo "Installing charm mods"
# go install github.com/charmbracelet/mods@latest
echo "Installing codesearch"
go install github.com/boyter/cs@${DOTFILES_CODESEARCH_VERSION}
echo "Installing gpterm"
go install github.com/collinvandyck/gpterm/cmd/gpterm@latest
# we have to install task manually since it's not in apt
if [[ $(task --version 2>/dev/null | grep -o "$DOTFILES_TASK_VERSION") != "$DOTFILES_TASK_VERSION" ]]; then
echo "Installing task ${DOTFILES_TASK_VERSION}"
go install github.com/go-task/task/v3/cmd/task@v${DOTFILES_TASK_VERSION}
fi