-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
79 lines (64 loc) · 1.79 KB
/
justfile
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
76
77
78
79
set windows-shell := ["C:/Program Files/Git/bin/bash.exe", "-c"]
# Default recipe to display help information
default:
@just --list
# Build all binaries
build:
go build -o bin/bot ./cmd/bot
go build -o bin/worker ./cmd/worker
go build -o bin/export ./cmd/export
go build -o bin/db ./cmd/db
go build -o bin/rest ./cmd/rest
go build -o bin/rpc ./cmd/rpc
# Run tests with coverage
test:
go test -v ./...
# Run linter
lint:
golangci-lint run --fix --timeout 120s
# Run the bot service
run-bot:
go run ./cmd/bot
# Run the worker service with specified type and count
run-worker type="friend" count="1":
go run ./cmd/worker {{type}} --workers {{count}}
# Run the REST API service
run-rest:
go run ./cmd/rest
# Run the RPC service
run-rpc:
go run ./cmd/rpc
# Run database migrations
run-db *args:
go run ./cmd/db {{args}}
# Run data export with standardized settings
run-export description="Export" version="1.0.1":
# Create exports directory if it doesn't exist
mkdir -p exports
# Run export command with standardized settings
go run ./cmd/export \
-o exports \
--salt "r0t3ct0r_$(date +%Y%m%d)_$RANDOM" \
--export-version {{version}} \
--description "{{description}}" \
--hash-type argon2id \
--c 10 \
--i 16 \
-m 32
# Clean build artifacts
clean:
rm -rf bin/
go clean -cache -testcache
# Download dependencies
deps:
go mod download
go mod tidy
# Generate mocks and other generated code
generate:
go generate ./...
# Build container image using Dagger
build-container *args:
dagger call build {{args}}
# Publish container image using Dagger
publish-container name platform="linux/amd64":
dagger call publish --src . --image-name {{name}} --platforms {{platform}}