aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..e0e2fa9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+.PHONY: build container clean
+
+REGISTRY_NAME=seaweedfs
+IMAGE_NAME=csi
+VERSION ?= dev
+IMAGE_TAG=$(REGISTRY_NAME)/$(IMAGE_NAME):$(VERSION)
+
+build:
+ CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o _output/seaweedfs-csi-driver ./cmd/seaweedfs-csi-driver/main.go
+container: build
+ docker build -t $(IMAGE_TAG) -f cmd/seaweedfs-csi-driver/Dockerfile .
+push: container
+ docker push $(IMAGE_TAG)
+clean:
+ go clean -r -x
+ -rm -rf _output