From 431e5bfe9897dbc1715994e304af4e1b0d9fb28c Mon Sep 17 00:00:00 2001 From: David Zhu Date: Tue, 9 Jan 2018 17:14:38 -0800 Subject: [PATCH] Updated Makefile so that it doesn't recompile stale binaries. Added gitignore entries for common items and binaries --- .gitignore | 39 +++++++++++++++++++++++++++++++++++++++ Makefile | 10 ++++++---- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a1338d685..c936c70f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Compiled binaries and deployment files +/bin/ +/deploy/ + # Binaries for programs and plugins *.exe *.dll @@ -12,3 +16,38 @@ # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 .glide/ + +# OSX leaves these everywhere on SMB shares +._* + +# OSX trash +.DS_Store + +# Eclipse files +.classpath +.project +.settings/** + +# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA +.idea/ +*.iml + +# Vscode files +.vscode + +# This is where the result of the go build goes +/output*/ +/_output*/ +/_output + +# Emacs save files +*~ +\#*\# +.\#* + +# Vim-related files +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist diff --git a/Makefile b/Makefile index 4ec308b8f..333a3ddd0 100644 --- a/Makefile +++ b/Makefile @@ -20,20 +20,22 @@ IMAGE_VERSION=latest ifdef V TESTARGS = -v -args -alsologtostderr -v 5 else -TESTARGS = +TESTARGS = endif all: csi-attacher csi-attacher: - go build -o csi-attacher cmd/csi-attacher/main.go + go install github.com/kubernetes-csi/external-attacher/cmd/csi-attacher + mkdir -p bin + cp ${GOPATH}/bin/csi-attacher bin/csi-attacher clean: - -rm -rf csi-attacher deploy/docker/csi-attacher + -rm -rf bin deploy/docker/csi-attacher container: csi-attacher - cp csi-attacher deploy/docker + cp bin/csi-attacher deploy/docker docker build -t $(IMAGE_NAME):$(IMAGE_VERSION) deploy/docker push: container