Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
74 lines (66 loc) 路 1.97 KB
/
Copy pathTaskfile.yml
File metadata and controls
74 lines (66 loc) 路 1.97 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
# https://taskfile.dev
version: "3"
vars:
HOST:
sh: hostname -s
tasks:
default:
cmds:
- task --list
silent: true
setup:
desc: Apply the dotfiles
cmds:
- ./setup
brew:
desc: Update Homebrew and regenerate the machine's Brewfile
preconditions:
- sh: test -f Brewfile.{{.HOST}}
msg: "No Brewfile.{{.HOST}}: run this from the repository root, on a known machine."
cmds:
- brew update
- brew upgrade --yes
- brew autoremove
- brew cleanup --scrub --prune 0
- brew bundle dump --file Brewfile.{{.HOST}} --no-go --no-uv --no-cargo --no-npm --force
nvim:
desc: Update Neovim plugins and Tree-sitter parsers
cmds:
- |
nvim --headless -u nvim/init.lua -l - <<'LUA'
assert(vim.v.errmsg == "", vim.v.errmsg)
vim.pack.update(nil, { force = true })
LUA
- |
nvim --headless -u nvim/init.lua -l - <<'LUA'
assert(vim.v.errmsg == "", vim.v.errmsg)
assert(require("plugins.syntax").install_parsers():wait(), "Tree-sitter parser installation failed")
assert(require("nvim-treesitter").update(nil, { summary = true }):wait(), "Tree-sitter parser update failed")
LUA
update:
desc: Update everything and commit the changes (on main)
cmds:
- task: brew
- task: nvim
- task: commit
commit:
internal: true
status:
- test "$(git symbolic-ref --short HEAD)" != main
cmds:
- git add Brewfile.{{.HOST}}
- 'git diff --cached --quiet || git commit -m "chore(darwin): update Brewfile.{{.HOST}}"'
- git add ./nvim/nvim-pack-lock.json
- "git diff --cached --quiet || git commit -m 'chore(nvim): update lockfile'"
release:
desc: Tag and release with GoReleaser
vars:
TAG:
sh: date +%Y.%-m.%-d
env:
GITHUB_TOKEN:
sh: gh auth token
cmds:
- git tag -m "{{.TAG}}" "{{.TAG}}"
- git push --tags
- goreleaser release --clean