blob: c0746ac637a97695e64fbee07f1af07c6915a08c (
plain) (
blame)
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
|
version: "3"
vars:
BINARY: iku
tasks:
default:
desc: Build the application
cmds:
- task: build
build:
desc: Build the binary with optimisations
cmds:
- go build -ldflags="-s -w" -o {{.BINARY}} .
sources:
- ./**/*.go
generates:
- ./{{.BINARY}}
run:
desc: Build and run the application
deps: [build]
cmds:
- ./{{.BINARY}}
install:
desc: Install the binary to GOPATH/bin
deps: [build]
cmds:
- cp {{.BINARY}} ${GOPATH:-~/go}/bin/{{.BINARY}}
clean:
desc: Remove build artifacts
cmds:
- rm -f {{.BINARY}}
- go clean
test:
desc: Run tests
cmds:
- go test ./...
bench:
desc: Run benchmarks
cmds:
- go test -bench=. -benchmem ./...
fmt:
desc: Format code
cmds:
- iku -w . || go fmt ./...
lint:
desc: Run linter
cmds:
- golangci-lint run
dev:
desc: Build and run in development mode
cmds:
- go run .
|