-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yml
More file actions
46 lines (43 loc) · 1.24 KB
/
taskfile.yml
File metadata and controls
46 lines (43 loc) · 1.24 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
version: "3"
vars:
VERSION: "v0.0.1" # Static version for the build
COMMIT:
sh: git rev-parse HEAD # Captures the current git commit hash
DATE:
sh: date +%Y-%m-%dT%H:%M:%S%z # Captures the current date in ISO format
tasks:
clean:
desc: "Cleaning workspace ..."
cmds:
- rm -rf bin
build-server:
desc: "Building server..."
deps: [clean]
cmds:
- go build -ldflags "-X main.Version={{.VERSION}} -X main.Commit={{.COMMIT}} -X main.BuildDate={{.DATE}}" -o ./bin/darkwing-server ./src/server
build-client:
desc: "Building client..."
cmds:
- go build -o ./bin/darkwing-client ./src/client
build:
desc: "Building both server and client..."
deps: [build-server, build-client]
cmds:
- echo "Build completed successfully."
test-server:
desc: "Running server tests..."
cmds:
- go test -v ./src/server/...
test-client:
desc: "Running client tests..."
cmds:
- go test -v ./src/client/...
test:
deps: [test-server, test-client]
desc: "Running tests..."
cmds:
- echo "All tests passed successfully."
run-server:
desc: "Run Darkwing server..."
cmds:
- go run ./src/server/server.go --db duckdb --host localhost --port 50051