11
22ROOT =.
33
4- VERSION ?= 1.0.0
4+ VERSION ?= 1.7.1
55OSNICK ?= buster
66
77# ----------------------------------------------------------------------------------------------
@@ -16,7 +16,7 @@ DOCKER_OS.bionic=ubuntu:bionic
1616DOCKER_OS.stretch =debian:stretch-slim
1717DOCKER_OS.buster =debian:buster-slim
1818DOCKER_OS =$(DOCKER_OS.$(OSNICK ) )
19-
19+
2020# ----------------------------------------------------------------------------------------------
2121
2222define targets # (1=OP, 2=op)
@@ -40,10 +40,23 @@ IID_$(1)=$(1)_$(VERSION).iid
4040CID_$(1 ) =$(1 ) _$(VERSION ) .cid
4141
4242build_x64:
43- @docker build --iidfile $$(IID_$(1 ) ) -t redisfab/$(STEM ) -$( 1 ) :$(VERSION ) -f Dockerfile.x64 \
43+ @docker build --iidfile $$(IID_$(1 ) ) -t redisfab/$(STEM ) -x64 :$(VERSION ) -f Dockerfile.x64 \
4444 --build-arg OS=$(DOCKER_OS ) $(ROOT )
4545 @docker create --cidfile $$(CID_$(1 ) ) `cat $$(IID_$(1 ) ) `
46- @docker cp `cat $$(CID_$(1 ) ) `:/build/$(STEM ) -$(2 ) -$(VERSION ) .tgz .
46+ @docker cp `cat $$(CID_$(1 ) ) `:/build/$(STEM ) -x64-$(VERSION ) .tgz .
47+
48+ .PHONY: build_x64
49+ endef
50+
51+ define build_x64-gpu # (1=arch, 2=tar-arch)
52+ IID_$(1 ) =$(1 ) _$(VERSION ) .iid
53+ CID_$(1 ) =$(1 ) _$(VERSION ) .cid
54+
55+ build_x64-gpu:
56+ @docker build --iidfile $$(IID_$(1 ) ) -t redisfab/$(STEM ) -$(1 ) :$(VERSION ) -f Dockerfile.x64-gpu \
57+ --build-arg OS=$(DOCKER_OS ) $(ROOT )
58+ @docker create --cidfile $$(CID_$(1 ) ) `cat $$(IID_$(1 ) ) `
59+ @docker cp `cat $$(CID_$(1 ) ) `:/build/$(STEM ) -$(1 ) -$(VERSION ) .tgz .
4760
4861.PHONY: build_x64
4962endef
@@ -68,11 +81,18 @@ endef
6881
6982define publish_x64 # (1=arch, 2=tar-arch)
7083publish_x64:
71- @aws s3 cp $(STEM ) -$(2 ) -$(VERSION ) .tar.gz s3://$(S3_URL ) / --acl public-read
84+ @aws s3 cp $(STEM ) -$(2 ) -$(VERSION ) .tgz s3://$(S3_URL ) / --acl public-read
7285
7386.PHONY: publish_x64
7487endef
7588
89+ define publish_x64-gpu # (1=arch, 2=tar-arch)
90+ publish_x64-gpu:
91+ @aws s3 cp $(STEM ) -$(2 ) -$(VERSION ) .tgz s3://$(S3_URL ) / --acl public-read
92+
93+ .PHONY: publish_x64-gpu
94+ endef
95+
7696define publish_arm # (1=arch, 2=tar-arch)
7797publish_$(1 ) :
7898 @aws s3 cp $(STEM ) -$(2 ) -$(VERSION ) .tgz s3://$(S3_URL ) / --acl public-read
@@ -90,6 +110,7 @@ all: build publish
90110build : $(BUILD_TARGETS )
91111
92112$(eval $(call build_x64,x64,x86_64))
113+ $(eval $(call build_x64-gpu,x64-gpu,x86_64-gpu))
93114$(eval $(call build_arm,arm64v8,arm64))
94115$(eval $(call build_arm,arm32v7,arm))
95116
@@ -101,7 +122,8 @@ endif
101122
102123publish : $(PUBLISH_TARGETS )
103124
104- $(eval $(call publish_x64,x64,x86_64))
125+ $(eval $(call publish_x64,x64,x64))
126+ $(eval $(call publish_x64-gpu,x64-gpu,x64-gpu))
105127$(eval $(call publish_arm,arm64v8,arm64))
106128$(eval $(call publish_arm,arm32v7,arm))
107129
0 commit comments