forked from dlvhdr/gh-dash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
143 lines (120 loc) · 3.56 KB
/
Taskfile.yaml
File metadata and controls
143 lines (120 loc) · 3.56 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# https://taskfile.dev
version: "3"
silent: true
tasks:
default:
desc: Run
cmds:
- go run . {{.CLI_ARGS}}
interactive: true
build:
desc: Build
cmds:
- go build .
uninstall:
desc: Uninstall from the gh extensions
cmd: |
if gh ext list | grep --quiet 'gh dash'; then echo "🕐 Uninstalling..."; gh ext remove dash; fi
exit 0
install:
desc: Install the local app as a gh extension
cmds:
- task: build
- task: uninstall
- echo "🕐 Installing local build..." && gh ext install .
- gh dash --version
install:prod:
desc: Install the latest available version as a gh extension
cmds:
- task: uninstall
- echo "🕐 Installing latest version..." && gh ext install dlvhdr/gh-dash
- gh dash --version
debug:
desc: Run in debug mode. Run `task logs` to watch the logs.
cmds:
- printf "~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n―――――――――――――――――――――――――――――――――――――――――――――――\n" > ./debug.log
- DEBUG=true go run . --debug {{.CLI_ARGS}}
interactive: true
debug:warn:
desc: Run in debug mode, only log warning. Run `task logs` to watch the logs.
cmds:
- printf "~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n~\n―――――――――――――――――――――――――――――――――――――――――――――――\n" > ./debug.log
- LOG_LEVEL=warn DEBUG=true go run . --debug {{.CLI_ARGS}}
interactive: true
dlv:
desc: Debug with dlv
cmds:
- dlv debug --headless --api-version=2 --listen=127.0.0.1:43000 .
logs:
desc: Tail the debug logs
cmds:
- rm -f ./debug.log
- touch ./debug.log
- tail -f ./debug.log
interactive: true
lint:
desc: Run base linters
cmds:
- golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m
env:
GOEXPERIMENT: null
lint:fix:
desc: Run base linters and fix issues
cmds:
- golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m --fix
env:
GOEXPERIMENT: null
test:one:
desc: Run a test
cmds:
- gotip
test:rerun:
cmds:
- gotip --rerun
desc: Rerun the last test
test:
desc: Run tests
cmds:
- prism test {{.CLI_ARGS}} ./...
fmt:
desc: Run gofumpt
cmds:
- gofumpt -w $(git ls-files '*.go')
check-nerd-font:
desc: Find broken nerdfont characters
cmds:
- nerdfix check $(fd --extension go)
fix-nerd-font:
desc: Fix broken nerdfont icons
cmds:
- nerdfix fix --format=json $(fd --extension go)
docs-prepare:
cmds:
- cd docs && pnpm i
docs:
cmds:
- cd docs && pnpm dev {{.CLI_ARGS}}
desc: Start docs server
docs-build:
desc: Run docs production build
cmds:
- task: docs-prepare
- cd docs && pnpm build
docs-preview:
desc: Preview docs production build
cmds:
- task: docs-build
- cd docs && pnpm preview
docs-sponsors:
desc: Update OpenCollective and GitHub sponsors list
cmds:
- which sponsors || go install github.com/goreleaser/sponsors@main
- sponsors generate --config gh://dlvhdr/sponsors/sponsors.yml sponsors.json
- sponsors apply sponsors.json gh://dlvhdr/sponsors/readme.tpl.md ./README.md
sources:
- ./README.md
- ./.github/sponsors/sponsors.json
- ./.github/sponsors/sponsors.yml
generates:
- ./README.md
- ./.github/sponsors/sponsors.json