-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
75 lines (58 loc) · 1.53 KB
/
Copy pathjustfile
File metadata and controls
75 lines (58 loc) · 1.53 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
bin := "sftpgo-manager"
cover_file := "coverage.out"
# List available recipes
default:
@just --list
# Build the binary
build:
go build -o {{bin}} .
# Build and run the server
run: build
./{{bin}}
# Run all tests
test:
go test ./... -count=1
# Run tests with race detector
test-race:
go test ./... -count=1 -race
# Run tests verbose
test-verbose:
go test ./... -count=1 -v
# Run tests with coverage report
test-cover:
go test ./... -count=1 -coverprofile={{cover_file}}
go tool cover -func={{cover_file}}
# Open coverage report in browser
test-cover-html: test-cover
go tool cover -html={{cover_file}}
# Run golangci-lint
lint:
golangci-lint run ./...
# Regenerate Swagger docs
swagger:
swag init
@echo "Swagger docs regenerated in docs/"
# Serve godoc on http://localhost:6060
godoc:
@echo "Opening http://localhost:6060/pkg/sftpgo-manager/"
@echo "Press Ctrl+C to stop"
godoc -http=:6060
# Start full stack (SFTPGo + MinIO + backend)
docker-up:
docker compose up -d --build
# Stop and remove containers
docker-down:
docker compose down
# Tail logs from all services
docker-logs:
docker compose logs -f
# Remove build artifacts
clean:
rm -f {{bin}} {{cover_file}}
# Install dev tools (swag, godoc, golangci-lint)
install-tools:
go install github.com/swaggo/swag/cmd/swag@latest
go install golang.org/x/tools/cmd/godoc@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Run build + test + lint (CI check)
ci: build test-race lint