build: Add arm64 to cross build

Signed-off-by: Chris Crone <christopher.crone@docker.com>
This commit is contained in:
Chris Crone 2020-10-21 16:45:08 +02:00 коммит произвёл Djordje Lukic
Родитель df797444d0
Коммит af863bfaad
2 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -50,6 +50,10 @@ package-cross: cross ## Package the cross compiled binaries in tarballs for *nix
--platform linux/amd64 \
--output type=tar,dest=- \
--target package | gzip -9 > dist/$(BINARY_NAME)-linux-amd64.tar.gz
docker build $(BUILD_ARGS) . \
--platform linux/arm64 \
--output type=tar,dest=- \
--target package | gzip -9 > dist/$(BINARY_NAME)-linux-arm64.tar.gz
docker build $(BUILD_ARGS) . \
--platform darwin/amd64 \
--output type=tar,dest=- \

Просмотреть файл

@ -44,6 +44,7 @@ test-unit:
cross:
GOOS=linux GOARCH=amd64 $(STATIC_FLAGS) $(GO_BUILD) -o bin/$(BINARY_NAME)_linux_amd64 ./cmd/$(BINARY_NAME)
GOOS=linux GOARCH=arm64 $(STATIC_FLAGS) $(GO_BUILD) -o bin/$(BINARY_NAME)_linux_arm64 ./cmd/$(BINARY_NAME)
GOOS=darwin GOARCH=amd64 $(STATIC_FLAGS) $(GO_BUILD) -o bin/$(BINARY_NAME)_darwin_amd64 ./cmd/$(BINARY_NAME)
GOOS=windows GOARCH=amd64 $(STATIC_FLAGS) $(GO_BUILD) -o bin/$(BINARY_NAME)_windows_amd64.exe ./cmd/$(BINARY_NAME)