@@ -37,41 +37,45 @@ distclean: clean
3737# ################################################
3838
3939BINARY_OUTPUT =$(OUTPUT_ROOT ) binary/
40- BUNDLE_MAKE=v =$v GOOS_OVERRIDE='GOOS=$(1 ) GOARCH=$(2 ) ' PREFIX=$(3 ) make $(3 ) bin/step
4140RELEASE =./.travis-releases
4241
42+ define BUNDLE_MAKE
43+ $(q ) GOOS_OVERRIDE='GOOS=$(1 ) GOARCH=$(2 ) GOARM=$(3 ) ' PREFIX=$(4 ) make $(4 ) bin/step
44+ endef
45+
4346binary-linux :
44- $(call BUNDLE_MAKE,linux,amd64,$(BINARY_OUTPUT ) linux/)
47+ $(call BUNDLE_MAKE,linux,amd64,,$(BINARY_OUTPUT ) linux/)
48+
49+ binary-linux-arm64 :
50+ $(call BUNDLE_MAKE,linux,arm64,,$(BINARY_OUTPUT ) linux.arm64/)
51+
52+ binary-linux-armv7 :
53+ $(call BUNDLE_MAKE,linux,arm,7,$(BINARY_OUTPUT ) linux.armv7/)
4554
4655binary-darwin :
47- $(call BUNDLE_MAKE,darwin,amd64,$(BINARY_OUTPUT ) darwin/)
56+ $(call BUNDLE_MAKE,darwin,amd64,, $(BINARY_OUTPUT ) darwin/)
4857
4958binary-windows :
50- $(call BUNDLE_MAKE,windows,amd64,$(BINARY_OUTPUT ) windows/)
59+ $(call BUNDLE_MAKE,windows,amd64,, $(BINARY_OUTPUT ) windows/)
5160
5261define BUNDLE
53- $(q ) set -e; BUNDLE_DIR=$(BINARY_OUTPUT )$(1 ) /bundle; \
54- stepName=step_$(2 ) ; \
55- mkdir -p $$BUNDLE_DIR $(RELEASE ) ; \
56- TMP=$$(mktemp -d $$BUNDLE_DIR/tmp.XXXX ) ; \
57- trap "rm -rf $$TMP" EXIT INT QUIT TERM; \
58- newdir=$$TMP/$$stepName; \
59- mkdir -p $$newdir/bin; \
60- cp $(BINARY_OUTPUT )$(1 ) /bin/step $$newdir/bin/$(4 ) ; \
61- cp README.md $$newdir/; \
62- NEW_BUNDLE=$(RELEASE ) /step_$(2 ) _$(1 ) _$(3 ) .tar.gz; \
63- rm -f $$NEW_BUNDLE; \
64- tar -zcvf $$NEW_BUNDLE -C $$TMP $$stepName;
62+ # $(1) -- Binary Output Dir Name
63+ # $(2) -- Step Platform Name
64+ # $(3) -- Step Binary Architecture
65+ # $(4) -- Step Binary Name (For Windows Comaptibility)
66+ $(q ) ./make/bundle.sh "$(BINARY_OUTPUT )$(1 ) " "$(RELEASE ) " "$(VERSION ) " "$(2 ) " "$(3 ) " "$(4 ) "
6567endef
6668
67- bundle-linux : binary-linux
68- $(call BUNDLE,linux,$(VERSION ) ,amd64,step)
69+ bundle-linux : binary-linux binary-linux-arm64 binary-linux-armv7
70+ $(call BUNDLE,linux,linux,amd64,step)
71+ $(call BUNDLE,linux.arm64,linux,arm64,step)
72+ $(call BUNDLE,linux.armv7,linux,armv7,step)
6973
7074bundle-darwin : binary-darwin
71- $(call BUNDLE,darwin,$( VERSION ) ,amd64,step)
75+ $(call BUNDLE,darwin,darwin ,amd64,step)
7276
7377bundle-windows : binary-windows
74- $(call BUNDLE,windows,$( VERSION ) ,amd64,step.exe)
78+ $(call BUNDLE,windows,windows ,amd64,step.exe)
7579
7680.PHONY : binary-linux binary-darwin binary-windows bundle-linux bundle-darwin bundle-windows
7781
0 commit comments