Skip to content

Commit

Permalink
feat: add static binary for alpine support
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendanGalloway committed Jun 20, 2024
1 parent 0d5efa7 commit 5fef127
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ help:
@cat docs/developer-guide/make-targets.md

.PHONY: release
release: linux compress
release: linux alpine compress

.PHONY: build
build:
Expand All @@ -33,6 +33,12 @@ linux:
cp .bin/$(NAME)_linux-amd64 .bin/$(NAME)
GOOS=linux GOARCH=arm64 go build -ldflags "-X \"main.version=$(VERSION_TAG)\"" -o .bin/$(NAME)_linux-arm64

.PHONY: alpine
linux:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X \"main.version=$(VERSION_TAG)\"" -o .bin/$(NAME)_alpine-amd64
cp .bin/$(NAME)_linux-amd64 .bin/$(NAME)
GCGO_ENABLED=0 OOS=linux GOARCH=arm64 go build -ldflags "-X \"main.version=$(VERSION_TAG)\"" -o .bin/$(NAME)_alpine-arm64

.PHONY: darwin
darwin:
GOOS=darwin GOARCH=amd64 go build -ldflags "-X \"main.version=$(VERSION_TAG)\"" -o .bin/$(NAME)_darwin-amd64
Expand All @@ -53,4 +59,4 @@ install:

.PHONY: lint
lint: build
golangci-lint run --verbose --print-resources-usage
golangci-lint run --verbose --print-resources-usage

0 comments on commit 5fef127

Please sign in to comment.