diff options
author | Ian Lewis <ianlewis@google.com> | 2018-12-04 04:55:39 -0500 |
---|---|---|
committer | Ian Lewis <ianlewis@google.com> | 2018-12-04 04:55:39 -0500 |
commit | ae2250b1dd07fcdb6a2212022b75d63d26966499 (patch) | |
tree | 7c155cffdcf66ea800a0d812dee11b9a6044eabd /Makefile |
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..89e705ddf --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +# Base path used to install. +DESTDIR=/usr/local +GO_BUILD_FLAGS= +GO_TAGS= +GO_LDFLAGS=-ldflags '-s -w -extldflags "-static"' +SOURCES=$(shell find cmd/ pkg/ vendor/ -name '*.go') +DEPLOY_PATH=cri-containerd-staging/gvisor-containerd-shim +VERSION=$(shell git rev-parse HEAD) + +bin/gvisor-containerd-shim: $(SOURCES) + CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} -o bin/gvisor-containerd-shim ${SHIM_GO_LDFLAGS} ${GO_TAGS} ./cmd/gvisor-containerd-shim + + +install: bin/gvisor-containerd-shim + mkdir -p $(DESTDIR)/bin + install bin/gvisor-containerd-shim $(DESTDIR)/bin + +uninstall: + rm -f $(DESTDIR)/bin/gvisor-containerd-shim + +clean: + rm -rf bin/* + +push: bin/gvisor-containerd-shim + gsutil cp ./bin/gvisor-containerd-shim gs://$(DEPLOY_PATH)/gvisor-containerd-shim-$(VERSION) + echo "gvisor-containerd-shim-$(VERSION)" | gsutil cp - "gs://$(DEPLOY_PATH)/latest" |