-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
47 lines (36 loc) · 1.09 KB
/
justfile
File metadata and controls
47 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
#
# 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 .
# Formatting all web source code
npx prettier --write "**/*.html.tmpl"
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 Willow
CGO_ENABLED=0 go build -o willow -ldflags "-s -w -X main.version=`git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g'`" ./cmd
clean:
# Cleaning up
rm -rf willow out/
clean-all:
# Removing build artifacts, willow.sqlite, config.toml, and data/ directory
rm -rf willow out willow.sqlite config.toml data