open-nomad/.circleci/config/commands/install-golang.yml

24 lines
640 B
YAML
Raw Normal View History

parameters:
target_directory:
type: string
default: /usr/local
steps:
- run:
name: install golang
command: |
set -x
os="linux"
if [[ "$OSTYPE" == "darwin"* ]]
then
os="darwin"
fi
echo installing golang ${GOLANG_VERSION}
sudo rm -rf << parameters.target_directory >>/go
sudo mkdir -p << parameters.target_directory >>
curl -SL --fail -o /tmp/golang.tar.gz https://dl.google.com/go/go${GOLANG_VERSION}.${os}-amd64.tar.gz
sudo tar -C << parameters.target_directory >> -xzf /tmp/golang.tar.gz
rm -rf /tmp/golang.tar.gz