From 10718b7eb28cf4f9b7fead0d5956d0e69b712bf9 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 | 35 +++++++++++++++++++++++++++++++++-- Makefile | 10 ++++++---- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index a1338d6851..30946d7779 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Compiled binaries and deployment files +/bin/ +/deploy/docker/csi-attacher + # Binaries for programs and plugins *.exe *.dll @@ -10,5 +14,32 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out -# 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 + +# 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 4ec308b8fd..333a3ddd00 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