codeclimate/test-reporter

View on GitHub
.circleci/xcode_install_go

Summary

Maintainability
Test Coverage
#!/bin/bash
#
# Installs Golang in an mac os environment
#
###
set -e
set -o nounset
set -o errexit
set -o pipefail

PROJECT_RELATIVE_PATH=src/github.com/codeclimate/test-reporter

# Install goSDK
mkdir ~/gosdk && cd "$_"
echo 'export PATH=$PATH:$HOME/gosdk/go/bin' >> "$BASH_ENV"
echo 'export GOROOT=$HOME/gosdk/go' >> "$BASH_ENV"
curl -O https://dl.google.com/go/go1.15.darwin-amd64.tar.gz
tar -xzf go1.15.darwin-amd64.tar.gz

# Set go path - workspace root
mkdir -p ~/projects/go/${PROJECT_RELATIVE_PATH} && cd "$_"
echo 'export GOPATH=$HOME/projects/go' >> "$BASH_ENV"
. "$BASH_ENV"
cp -r ~/project/ $GOPATH/${PROJECT_RELATIVE_PATH}