diff --git a/cmd/cli/Makefile b/cmd/cli/Makefile index d6d5b4ae..3235b573 100644 --- a/cmd/cli/Makefile +++ b/cmd/cli/Makefile @@ -14,7 +14,7 @@ all: build build: @echo "Building $(BINARY_NAME)..." - go build -ldflags="-s -w -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(shell git describe --tags --always --dirty)" -o $(BINARY_NAME) . + go build -ldflags="-s -w -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(shell git describe --tags --always --dirty --match "cmd/cli*" | sed 's|^cmd/cli/||')" -o $(BINARY_NAME) . link: @if [ ! -f $(BINARY_NAME) ]; then \