Created
February 17, 2017 22:02
-
-
Save ericchiang/697d6f1c8f5f8f445fbd1b7d2d86d4f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
rm -rf ~/.glide/cache | |
export GOPATH=$( mktemp -d ) | |
PKG=client-go-example | |
PKG_PATH=$GOPATH/src/$PKG | |
function cleanup { | |
rm -rf "$GOPATH" | |
} | |
trap cleanup EXIT | |
mkdir -p $PKG_PATH | |
cd $PKG_PATH | |
cat << EOF >> glide.yaml | |
package: client-go-example | |
import: | |
- package: k8s.io/client-go | |
version: v2.0.0-alpha.0 | |
EOF | |
cat << EOF >> main.go | |
package main | |
import "k8s.io/client-go/kubernetes" | |
var _ = kubernetes.Clientset{} | |
func main() {} | |
EOF | |
glide up -v | |
go install -v | |
cat glide.lock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment