diff --git a/justfile b/justfile index c26da63cddfcd2ca4bcf198dacf71a9f164496e4..7f3f6e25ebe029802ab8bc844f503933eb3cc4c8 100644 --- a/justfile +++ b/justfile @@ -4,6 +4,7 @@ GOOS := env("GOOS", `go env GOOS`) GOARCH := env("GOARCH", `go env GOARCH`) +VERSION := `git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g'` default: fmt lint staticcheck test vuln reuse @@ -36,11 +37,11 @@ reuse: build: # Building lunatask-mcp-server - CGO_ENABLED=0 GOOS={{GOOS}} GOARCH={{GOARCH}} go build -o lunatask-mcp-server -ldflags "-s -w -X main.version=`git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g'`" . + CGO_ENABLED=0 GOOS={{GOOS}} GOARCH={{GOARCH}} go build -o lunatask-mcp-server -ldflags "-s -w -X main.version={{VERSION}}" . run: # Running lunatask-mcp-server - CGO_ENABLED=0 GOOS={{GOOS}} GOARCH={{GOARCH}} go run -ldflags "-s -w -X main.version=`git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g'`" . + CGO_ENABLED=0 GOOS={{GOOS}} GOARCH={{GOARCH}} go run -ldflags "-s -w -X main.version={{VERSION}}" . pack: # Packing lunatask-mcp-server @@ -53,5 +54,4 @@ clean: clean-all: # Removing build artifacts and config.toml - rm -rf lunatask-mcp-server config.toml