From a381c89c256548f6a6a577cd42d0a55881a9b26f Mon Sep 17 00:00:00 2001 From: Amolith Date: Sat, 26 Apr 2025 17:49:01 -0600 Subject: [PATCH] feat: add justfile --- justfile | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000000000000000000000000000000000000..0949e49aebf3a56c0e9bd51272d3bd822e37232e --- /dev/null +++ b/justfile @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: Amolith +# +# SPDX-License-Identifier: CC0-1.0 + +default: fmt lint staticcheck test vuln reuse + +fmt: + # Formatting all Go source code + go install mvdan.cc/gofumpt@latest + gofumpt -l -w . + +lint: + # Linting Go source code + golangci-lint run + +staticcheck: + # Performing static analysis + go install honnef.co/go/tools/cmd/staticcheck@latest + staticcheck ./... + +test: + # Running tests + go test -v ./... + +vuln: + # Checking for vulnerabilities + go install golang.org/x/vuln/cmd/govulncheck@latest + govulncheck ./... + +reuse: + # Linting licenses and copyright headers + reuse lint + +build: + # Building lunatask-mcp-server + CGO_ENABLED=0 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'`" . + +clean: + # Removing build artifacts + rm -rf lunatask-mcp-server + +clean-all: + # Removing build artifacts and config.toml + + rm -rf lunatask-mcp-server config.toml