-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathTaskfile.yml
More file actions
63 lines (52 loc) · 1.53 KB
/
Taskfile.yml
File metadata and controls
63 lines (52 loc) · 1.53 KB
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'
tasks:
build:
desc: Build the binary file
cmds:
- echo "Building the binary file"
- go build -ldflags="-X 'github.com/karl-cardenas-coding/mywhoop/cmd.VersionString=1.0.0'" -o=whoop -v
license:
desc: Apply license headers
cmds:
- echo "Applying license headers..."
- copywrite headers
opensource:
desc: Check for open source licenses
cmds:
- echo "Checking for open source licenses"
- ~/go/bin/go-licenses report github.com/karl-cardenas-coding/mywhoop --template=docs/open-source.tpl > docs/open-source.md
tests:
desc: Run tests
cmds:
- echo "Running tests"
- go test -race -shuffle on ./...
tests-coverage:
desc: Start Go Test with code coverage
cmds:
- echo "Running Go Tests with code coverage"
- go test -v -race -shuffle on -cover -coverprofile=coverage.out -covermode=atomic ./...
view-coverage:
desc: View the code coverage
cmds:
- echo "Viewing the code coverage"
- go tool cover -html=coverage.out
nil:
desc: Check for nil errors
cmds:
- echo "Checking for nil errors"
- ~/go/bin/nilaway ./...
clean:
desc: Clean the binary file
cmds:
- echo "Cleaning the binary file"
- rm -rf dist/
- rm mywhoop_* || true
release-preview:
desc: Create a preview release
cmds:
- goreleaser release --snapshot --clean
docker-build:
desc: Build the Docker image
cmds:
- echo "Building the Docker image"
- docker build -t mywhoop .