makefile: add .exe when building for Windows (#3452)

Signed-off-by: Larry Bo <laurence.bordowitz@gmail.com>
This commit is contained in:
Larry Bordowitz
2025-11-05 12:36:22 -06:00
committed by GitHub
parent 93d095c67e
commit a961f737b7

View File

@@ -20,11 +20,13 @@ test-with-coverage:
test:
go test -v ./...
EXT := $(shell go env GOEXE)
# build tofu binary in the current directory with the version set to the git tag
# or commit hash if there is no tag.
.PHONY: build
build:
go build -ldflags "-X main.version=$(shell git describe --tags --always --dirty)" -o tofu ./cmd/tofu
go build -ldflags "-X main.version=$(shell git describe --tags --always --dirty)" -o tofu$(EXT) ./cmd/tofu
# generate runs `go generate` to build the dynamically generated
# source files, except the protobuf stubs which are built instead with