-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
41 lines (36 loc) · 858 Bytes
/
Taskfile.yml
File metadata and controls
41 lines (36 loc) · 858 Bytes
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
version: '3'
tasks:
default:
cmds:
- task: build
build:
desc: Build the binary
vars:
GIT_COMMIT:
sh: git rev-list -1 HEAD
cmds:
- go build -ldflags "-X main.CommitSHA={{.GIT_COMMIT}}" -o etu .
lint:
desc: Lint the code
cmds:
- go vet ./...
update:
desc: Update dependencies
cmds:
- git pull
- go get -u ./...
- go mod tidy
- cmd: |
if ! git diff --quiet HEAD go.*; then
git add go.mod go.sum
git commit -m 'chore: go update'
git push -u
fi
ignore_error: true
completions:
desc: Generate shell completions
deps: [build]
cmds:
- ./etu completion zsh > completions/_etu
- ./etu completion bash > completions/etu.bash
- ./etu completion fish > completions/etu.fish