-
Notifications
You must be signed in to change notification settings - Fork 15
/
Taskfile.yaml
79 lines (66 loc) · 1.45 KB
/
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
version: '3'
env:
GOLANG_CROSS_VERSION: 'v1.22'
PACKAGE_NAME: 'github.com/Broderick-Westrope/tetrigo'
tasks:
default:
cmds:
- task: lint
- task: test
install:
desc: Installs Tetrigo
aliases: [i]
sources:
- './**/*.go'
cmds:
- go install -v ./cmd/tetrigo
mod:
desc: Downloads and tidy Go modules
cmds:
- go mod download
- go mod tidy
lint:
desc: Runs golangci-lint
aliases: [l]
sources:
- './**/*.go'
- .golangci.yaml
cmds:
- golangci-lint run
lint:fix:
desc: Runs golangci-lint and fixes any issues
sources:
- './**/*.go'
- .golangci.yaml
cmds:
- golangci-lint run --fix
test:
desc: Runs test suite
aliases: [t]
cmds:
- go test -cover ./...
build:
desc: Build the binary
cmds:
- go build -v -o ./bin/ {{.CLI_ARGS}} ./...
run:
desc: Run the Go project
cmds:
- go run ./cmd/tetrigo/ {{.CLI_ARGS}}
cover:
desc: Run tests with coverage
cmds:
- go test -coverprofile=cover.out {{.CLI_ARGS}} ./...
- go tool cover -html=cover.out
goreleaser:install:
desc: Installs goreleaser
cmds:
- go install github.com/goreleaser/goreleaser@latest
goreleaser:dryrun:
desc: Releases the project
cmds:
- bash ./scripts/goreleaser/dryrun.sh
goreleaser:release:
desc: Releases the project
cmds:
- bash ./scripts/goreleaser/release.sh