-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
59 lines (57 loc) · 1.68 KB
/
Taskfile.yml
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
# https://taskfile.dev
version: '3'
tasks:
default:
deps:
- task: lint
- task: test
- task: build
- task: list
install:
cmds:
- go install -ldflags "-X main.commit=$(git rev-parse HEAD)"
build:preview:
cmds:
- goreleaser build --snapshot --single-target --clean --output dist/selfup
build:
cmds:
- go build -o ./dist/selfup ./cmd/selfup
run:
cmds:
- git ls-files -- examples ':!:*beta*' | xargs go run ./cmd/selfup run --skip-by=do_not_update_this_file
list:
cmds:
- git ls-files -- examples ':!:*beta*' | xargs go run ./cmd/selfup list --skip-by=do_not_update_this_file
update:
cmds:
- nix flake update --commit-lock-file
- nix develop --command go run ./cmd/selfup run .github/workflows/*.yml
- git diff-index --quiet HEAD || git commit -m 'Update CI dependencies with adjusting to nixpkgs' .github
test:
cmds:
- go test ./...
fmt:
cmds:
- typos . .github .vscode --write-changes
- dprint fmt
- go fmt ./...
- git ls-files '*.nix' | xargs nix fmt
lint:
# go fmt does not have option for no effect - https://github.com/golang/go/issues/41189
# nix fmt does not have option for no effect - https://github.com/NixOS/nix/issues/6918
cmds:
- dprint check
- go vet ./...
- goreleaser check
- typos . .github .vscode
# nix fmt doesn't have check: https://github.com/NixOS/nix/issues/6918
- git ls-files '*.nix' | xargs nixfmt --check
deps:
cmds:
- nix --version
- nixfmt --version
- task --version
- go version
- dprint --version
- goreleaser --version
- typos --version