Change summary
justfile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Detailed changes
@@ -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