-
Notifications
You must be signed in to change notification settings - Fork 2
/
Taskfile.yaml
52 lines (44 loc) · 886 Bytes
/
Taskfile.yaml
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
# https://taskfile.dev
version: '3'
vars:
NAME: 'blinkgo'
tasks:
clean:
cmds:
- go clean
test:
desc: "runs unit tests"
cmds:
- go test -v ./...
build:
cmds:
- go build -trimpath -ldflags "{{.BUILD_FLAGS}}" -o {{.NAME}}{{exeExt}} {{.CLI_ARGS}}
sources:
- ./**/*.go
generates:
- '{{.NAME}}{{exeExt}}'
method: checksum
env:
CGO_ENABLED: 0
GOOS: '{{default "" .BUILD_OS}}'
GOARCH: '{{default "" .BUILD_ARCH}}'
vars:
BUILD_FLAGS: '{{default "" .BUILD_FLAGS}}'
run:
deps: [ build ]
sources:
- ./**/*
- ./*
cmds:
- ./{{.NAME}}{{exeExt}} {{.CLI_ARGS}}
format:
cmds:
- gofmt -s -w .
sources:
- ./**/*.go
lint:
cmds:
- cmd: golangci-lint run -v -c ./.golangci.yml
ignore_error: true
sources:
- ./**/*.go