Skip to content

Commit 5796242

Browse files
committed
build(cli): filter git tags by cmd/cli prefix for version
Signed-off-by: Dorin Geman <[email protected]>
1 parent 4369d96 commit 5796242

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/cli/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ all: build
1414

1515
build:
1616
@echo "Building $(BINARY_NAME)..."
17-
go build -ldflags="-s -w -X github.com/docker/model-runner/cmd/cli/desktop.Version=$(shell git describe --tags --always --dirty)" -o $(BINARY_NAME) .
17+
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) .
1818

1919
link:
2020
@if [ ! -f $(BINARY_NAME) ]; then \

0 commit comments

Comments
 (0)