diff --git a/Makefile b/Makefile index bcdb163..a211625 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ MAINTAINER_NAME = Jose Diaz-Gonzalez REPOSITORY = docker-container-healthchecker HARDWARE = $(shell uname -m) SYSTEM_NAME = $(shell uname -s | tr '[:upper:]' '[:lower:]') -BASE_VERSION ?= 0.2.0 +BASE_VERSION ?= 0.3.0 IMAGE_NAME ?= $(MAINTAINER)/$(REPOSITORY) PACKAGECLOUD_REPOSITORY ?= dokku/dokku-betafish @@ -41,7 +41,8 @@ targets = $(addsuffix -in-docker, $(LIST)) @echo "VERSION=$(VERSION)" >> .env.docker build: prebuild - @$(MAKE) build/darwin/$(NAME) + @$(MAKE) build/darwin/$(NAME)-amd64 + @$(MAKE) build/darwin/$(NAME)-arm64 @$(MAKE) build/linux/$(NAME)-amd64 @$(MAKE) build/linux/$(NAME)-arm64 @$(MAKE) build/linux/$(NAME)-armhf @@ -62,15 +63,20 @@ $(targets): %-in-docker: .env.docker --workdir /src/github.com/$(MAINTAINER)/$(REPOSITORY) \ $(IMAGE_NAME):build make -e $(@:-in-docker=) -build/darwin/$(NAME): +build/darwin/$(NAME)-amd64: mkdir -p build/darwin - CGO_ENABLED=0 GOOS=darwin go build -a -asmflags=-trimpath=/src -gcflags=-trimpath=/src \ + CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -a -asmflags=-trimpath=/src -gcflags=-trimpath=/src \ -ldflags "-s -w -X main.Version=$(VERSION)" \ - -o build/darwin/$(NAME) + -o build/darwin/$(NAME)-amd64 +build/darwin/$(NAME)-arm64: + mkdir -p build/darwin + CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -a -asmflags=-trimpath=/src -gcflags=-trimpath=/src \ + -ldflags "-s -w -X main.Version=$(VERSION)" \ + -o build/darwin/$(NAME)-arm64 build/linux/$(NAME)-amd64: mkdir -p build/linux - CGO_ENABLED=0 GOOS=linux go build -a -asmflags=-trimpath=/src -gcflags=-trimpath=/src \ + CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -asmflags=-trimpath=/src -gcflags=-trimpath=/src \ -ldflags "-s -w -X main.Version=$(VERSION)" \ -o build/linux/$(NAME)-amd64 @@ -173,7 +179,8 @@ release: build bin/gh-release bin/gh-release-body tar -zcf release/$(NAME)_$(VERSION)_linux_amd64.tgz -C build/linux $(NAME)-amd64 tar -zcf release/$(NAME)_$(VERSION)_linux_arm64.tgz -C build/linux $(NAME)-arm64 tar -zcf release/$(NAME)_$(VERSION)_linux_armhf.tgz -C build/linux $(NAME)-armhf - tar -zcf release/$(NAME)_$(VERSION)_darwin_$(HARDWARE).tgz -C build/darwin $(NAME) + tar -zcf release/$(NAME)_$(VERSION)_darwin_amd64.tgz -C build/darwin $(NAME)-amd64 + tar -zcf release/$(NAME)_$(VERSION)_darwin_arm64.tgz -C build/darwin $(NAME)-arm64 cp build/deb/$(NAME)_$(VERSION)_amd64.deb release/$(NAME)_$(VERSION)_amd64.deb cp build/deb/$(NAME)_$(VERSION)_arm64.deb release/$(NAME)_$(VERSION)_arm64.deb cp build/deb/$(NAME)_$(VERSION)_armhf.deb release/$(NAME)_$(VERSION)_armhf.deb