馃Ч Dependency Scanner and Pruner
go
dependency
dependencies
1version: "3"
2
3vars:
4 BINARY: deppa
5
6tasks:
7 default:
8 desc: Build the application
9 cmds:
10 - task: build
11
12 build:
13 desc: Build the binary with optimisations
14 cmds:
15 - go build -ldflags="-s -w" -o {{.BINARY}} .
16 sources:
17 - ./**/*.go
18 generates:
19 - ./{{.BINARY}}
20
21 run:
22 desc: Build and run the application
23 deps: [build]
24 cmds:
25 - ./{{.BINARY}}
26
27 install:
28 desc: Install the binary to GOPATH/bin
29 deps: [build]
30 cmds:
31 - cp {{.BINARY}} ${GOPATH:-~/go}/bin/{{.BINARY}}
32
33 clean:
34 desc: Remove build artifacts
35 cmds:
36 - rm -f {{.BINARY}}
37 - go clean
38
39 fmt:
40 desc: Format code
41 cmds:
42 - iku -w . || go fmt ./...
43
44 lint:
45 desc: Run linter
46 cmds:
47 - golangci-lint run