Makefile: unset GOOS for get-envoy target (#5300)

The build-dev-docker.sh script will run

  env GOOS=linux make build

to build Pomerium for Linux (before copying this binary into a minimal
Docker image).

However, now that the get-envoy target is implemented using a Go
command, it too will be affected by GOOS. As a result running this step
on macOS will result in an error when trying to execute a Linux
get-envoy binary.

Instead, let's unset GOOS when running the get-envoy command, so that it
defaults to building for the host OS.
This commit is contained in:
Kenneth Jenkins 2024-09-20 10:54:07 -07:00 committed by GitHub
parent bfc782ff06
commit 753b24dd7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,7 +40,7 @@ all: clean build-deps test lint build ## Runs a clean, build, fmt, lint, test, a
.PHONY: get-envoy
get-envoy: ## Fetch envoy binaries
@echo "==> $@"
@cd pkg/envoy/files && go run ../get-envoy
@cd pkg/envoy/files && env -u GOOS go run ../get-envoy
.PHONY: deps-build
deps-build: get-envoy ## Install build dependencies