Skip to content

Instantly share code, notes, and snippets.

@verchol
Last active May 28, 2019 22:43
Show Gist options
  • Save verchol/e09b51bfea45de72254a8b632ec22ece to your computer and use it in GitHub Desktop.
Save verchol/e09b51bfea45de72254a8b632ec22ece to your computer and use it in GitHub Desktop.
Go Cache Setup
#!/bin/bash
export GOPATH=/codefresh/volume/.go
export GOCACHE=/codefresh/volume/caches/go-build
cf_export GOPATH=$GOPATH
cf_export GOCACHE=$GOCACHE
if [ ! -d "/codefresh/volume/.go" ]; then
mkdir -p /codefresh/volume/.go
echo "gopath folder has created , should not be created later"
fi
if [ ! -d "/codefresh/volume/caches/go-build" ]; then
echo cache was missed again
mkdir -p /codefresh/volume/caches/go-build
echo "cache folder has created for later usage"
fi
echo "cache was detected"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment