1# SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
2#
3# SPDX-License-Identifier: CC0-1.0
4
5default: fmt lint staticcheck test vuln reuse
6
7fmt:
8 # Formatting all Go source code
9 go install mvdan.cc/gofumpt@latest
10 gofumpt -l -w .
11
12lint:
13 # Linting Go source code
14 golangci-lint run
15
16staticcheck:
17 # Performing static analysis
18 go install honnef.co/go/tools/cmd/staticcheck@latest
19 staticcheck ./...
20
21test:
22 # Running tests
23 go test -v ./...
24
25vuln:
26 # Checking for vulnerabilities
27 go install golang.org/x/vuln/cmd/govulncheck@latest
28 govulncheck ./...
29
30reuse:
31 # Linting licenses and copyright headers
32 reuse lint
33
34build:
35 # Building lunatask-mcp-server
36 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'`" .
37
38clean:
39 # Removing build artifacts
40 rm -rf lunatask-mcp-server
41
42clean-all:
43 # Removing build artifacts and config.toml
44
45 rm -rf lunatask-mcp-server config.toml