-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTaskfile.yml
More file actions
169 lines (150 loc) · 2.97 KB
/
Taskfile.yml
File metadata and controls
169 lines (150 loc) · 2.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
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
---
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: '3'
# TODO: its
vars:
TODAY:
sh: date +'%Y%m%d'
env:
MAIN_BRANCH: master
CODEBERG_URL: https://codeberg.org/mimikun/dotfiles
tasks:
default:
cmds:
- task --list
silent: true
view:
desc: View remote codeberg repository
cmds:
- cmd: wsl-open $CODEBERG_URL
silent: true
patch:
desc: Create a patch file, and copy it to Host-Windows
cmds:
- task: clean
- task: diff-patch
- task: patch-copy-to-windows
silent: true
#tasks/patch/create
# TODO: it
diff-patch:
desc: Create a patch file
cmds:
- mise tasks run patch:create
silent: true
switch-master:
desc: Branch switching to master
aliases:
- switchmaster
- smas
cmds:
- git switch $MAIN_BRANCH
silent: true
# TODO: it
#tasks/clean
clean:
desc: File cleanup
cmds:
- mise tasks run clean
silent: true
# TODO: it
#tasks/update
update:
desc: Update some files managed by chezmoi
cmds:
- mise tasks run update:chezmoi
silent: true
# TODO: it
#tasks/patch/copy2win
patch-copy-to-windows:
desc: Copy patch to Host-Windows
cmds:
- mise tasks run patch:copy2win
silent: true
# TODO: it
#tasks/lint/
#tasks/lint/actionlint
#tasks/lint/ghalint
#tasks/lint/pwsh
#tasks/lint/selene
#tasks/lint/shell
#tasks/lint/stylua
#tasks/lint/typos
#tasks/lint/zizmor
lint:
desc: Linting
- test
cmds:
- mise tasks run lint
silent: true
# TODO: it
#tasks/format/
#tasks/format/shell
#tasks/format/stylua
format:
desc: Formatting
aliases:
- fmt
cmds:
- mise tasks run format
silent: true
clean-fetch:
desc: Powerful git fetch
aliases:
- cleanfetch
cmds:
- git fetch --all --prune --tags --prune-tags
silent: true
delete-branch:
desc: Delete unused patch branch
aliases:
- deleb
cmds:
- task: clean
- task: switch-master
- git branch --list "patch*" | xargs -n 1 git branch -D
silent: true
pull:
desc: Run git pull origin
aliases:
- pull-origin
cmds:
- git pull origin $MAIN_BRANCH
silent: true
# TODO: it
#tasks/git/push
push:
desc: git push to remote repository
cmds:
- git push
silent: true
#tasks/patch/branch
create-patch-branch:
desc: Create a patch branch with timestamp
aliases:
- patch-branch
- pab
cmds:
- git switch -c "patch-{{.TODAY}}"
silent: true
morning-routine:
desc: every day routine
aliases:
- morning
- mo
- mr
cmds:
- task: clean-fetch
- task: delete-branch
- task: pull-origin
- task: create-patch-branch
silent: true
#tasks/git/empty-commits
git-empty-commit:
desc: Create empty commits
aliases:
- empty
- ec
cmds:
- echo "hoge"
silent: true