docker-multi-arch-builder/Makefile
RouxAntoine a6d1ca1f65
Some checks failed
Main / build (push) Failing after 22s
feature: add binary push on release action
2023-07-12 00:45:04 +02:00

27 lines
618 B
Makefile

.PHONY: build
GOARCH=amd64
# GOARCH=arm
GOOS=darwin
# GOOS=linux
VERSION=$$(git rev-list -1 HEAD)
LDFLAGS=-w -s -X go/weather/internal/version.Version=$(VERSION)
GO_BUILD_FLAGS=-tags dev
CGO_ENABLED=0
build: dependencies
@echo "build for os $$GOOS and arch $$GOARCH"
go build -o bin/docker-multi-arch-builder-$(GOOS)-$(GOARCH) -ldflags="$(LDFLAGS)" $(GO_BUILD_FLAGS) main.go
dependencies:
go mod download
go mod verify
version:
./bin/docker-multi-arch-builder-darwin-amd64 --version
install: build
install -D -m 755 bin/docker-multi-arch-builder-$(GOOS)-$(GOARCH) /usr/local/bin/docker-multi-arch-builder