From b969e9ee1312b6e3a7f81592b40cecce35e1e0f5 Mon Sep 17 00:00:00 2001 From: Amolith Date: Tue, 29 Apr 2025 18:54:02 -0600 Subject: [PATCH] chore(justfile): revise versioning logic --- justfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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