Files
steve 528a09ca90 Independent client/engine versioning with compatibility check
Split release.sh into release-client.sh and release-engine.sh for
independent release cadences. Client checks engine version on first
API call and hard-fails if engine is below MinEngineVersion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:59:16 +00:00

22 lines
701 B
Makefile

VERSION ?= $(shell cat VERSION 2>/dev/null || echo "dev")
MIN_ENGINE_VERSION ?= $(shell cat MIN_ENGINE_VERSION 2>/dev/null || echo "dev")
LDFLAGS := -ldflags "-s -w -X github.com/kb-search/kb/cmd.Version=$(VERSION) -X github.com/kb-search/kb/cmd.MinEngineVersion=$(MIN_ENGINE_VERSION)"
PLATFORMS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64
.PHONY: build clean all
build:
go build $(LDFLAGS) -o kb .
all: $(PLATFORMS)
$(PLATFORMS):
$(eval OS := $(word 1,$(subst /, ,$@)))
$(eval ARCH := $(word 2,$(subst /, ,$@)))
$(eval EXT := $(if $(filter windows,$(OS)),.exe,))
GOOS=$(OS) GOARCH=$(ARCH) go build $(LDFLAGS) -o dist/kb-$(OS)-$(ARCH)$(EXT) .
clean:
rm -rf kb dist/