blob: e4481e8cbba76afb2eb11f2b64948501ebb51206 (
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
|
version: "3"
vars:
BINARY: deppa
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
fmt:
desc: Format code
cmds:
- iku -w . || go fmt ./...
lint:
desc: Run linter
cmds:
- golangci-lint run
|