From 24264d0363f77b973b8aa58771d86e36ce20b638 Mon Sep 17 00:00:00 2001 From: David Zhu Date: Wed, 10 Jan 2018 17:14:58 -0800 Subject: [PATCH] Improved build to only rebuild when source files changed. Changed output director to bin/ for consistency with external-attacher and driver-registrar. --- .gitignore | 3 +-- Dockerfile | 2 +- Makefile | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index c811e33a93..582a67540a 100644 --- a/.gitignore +++ b/.gitignore @@ -43,5 +43,4 @@ flycheck_*.el /.project # ignore build directory -_output/ - +bin/ diff --git a/Dockerfile b/Dockerfile index c17cb8ca90..0397201287 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ COPY ./examples/flex-debug.sh /opt/csi-provisioner/ # install the go kube piece of provisioner -COPY ./_output/csi-provisioner /opt/csi-provisioner/ +COPY ./bin/csi-provisioner /opt/csi-provisioner/ ENTRYPOINT ["/opt/csi-provisioner/csi-provisioner"] diff --git a/Makefile b/Makefile index 7f0de76f0c..1e5f234ca6 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,7 @@ container: build quick-container .PHONY: container clean: - rm -f external-provisioner - rm -rf _output + rm -rf bin .PHONY: clean format: @@ -52,8 +51,9 @@ push-container: .PHONY: push-container provisioner: - mkdir -p _output - go build -i -o _output/csi-provisioner ./cmd/csi-provisioner/ + mkdir -p bin + go install github.com/kubernetes-csi/external-provisioner/cmd/csi-provisioner + cp ${GOPATH}/bin/csi-provisioner bin/csi-provisioner .PHONY: provisioner all build: provisioner