Skip to content

Commit f888d11

Browse files
committed
chore: replace gimme with gvm
1 parent 40e6fb3 commit f888d11

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

dev-tools/common.bash

+12-13
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ get_go_version() {
3434
fi
3535
}
3636

37-
# install_gimme
38-
# Install gimme to HOME/bin.
39-
install_gimme() {
40-
# Install gimme
41-
if [ ! -f "${HOME}/bin/gimme" ]; then
42-
mkdir -p ${HOME}/bin
43-
curl -sL -o ${HOME}/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/v1.1.0/gimme
44-
chmod +x ${HOME}/bin/gimme
37+
# install_gvm
38+
# Install gvm to /usr/local/bin.
39+
# To read more about installing gvm in other platforms: https://github.com/andrewkroh/gvm#installation
40+
install_gvm() {
41+
# Install gvm
42+
if [ ! -f "/usr/local/bin/gvm" ]; then
43+
curl -sL -o ~/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.3.0/gvm-linux-amd64
44+
chmod +x /usr/local/bin/gvm
4545
fi
4646

47-
GIMME="${HOME}/bin/gimme"
48-
debug "Gimme version $(${GIMME} version)"
47+
GVM="/usr/local/bin/gvm"
48+
debug "Gvm version $(${GVM} --version)"
4949
}
5050

5151
# setup_go_root "version"
@@ -55,11 +55,10 @@ install_gimme() {
5555
setup_go_root() {
5656
local version=${1}
5757

58-
install_gimme
58+
install_gvm
5959

6060
# Setup GOROOT and add go to the PATH.
61-
${GIMME} "${version}" > /dev/null
62-
source "${HOME}/.gimme/envs/go${version}.env" 2> /dev/null
61+
eval "$(${GVM} ${version})"
6362

6463
debug "$(go version)"
6564
}

0 commit comments

Comments
 (0)