Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(build): add Windows executable suffix (#7271)

Jamison-J211eaeb91e89
diff --git a/Makefile b/Makefile
index 5e72f597ad..c492d2a567 100644
--- a/Makefile
+++ b/Makefile
@@ -278,11 +278,12 @@ multica: ## Run the multica CLI entrypoint directly from the Go source tree
VERSION ?= $(shell git describe --tags --match 'v[0-9]*' --always --dirty 2>/dev/null || echo dev)
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
DATE ?= $(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
+EXE := $(if $(filter windows,$(shell go env GOOS)),.exe,)
build: ## Build the server, CLI, and migrate binaries into server/bin
- cd server && go build -ldflags "-X main.version=$(VERSION) -X main.commit=$(COMMIT)" -o bin/server ./cmd/server
- cd server && go build -ldflags "-X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)" -o bin/multica ./cmd/multica
- cd server && go build -o bin/migrate ./cmd/migrate
+ cd server && go build -ldflags "-X main.version=$(VERSION) -X main.commit=$(COMMIT)" -o bin/server$(EXE) ./cmd/server
+ cd server && go build -ldflags "-X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)" -o bin/multica$(EXE) ./cmd/multica
+ cd server && go build -o bin/migrate$(EXE) ./cmd/migrate
test: ## Run Go tests after ensuring the target DB exists and migrations are applied
$(REQUIRE_ENV)