-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
120 lines (99 loc) · 2.21 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
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
version: "3"
#
# sub namespace: https://taskfile.dev/#/usage?id=including-other-taskfiles
#
includes:
v1:
taskfile: packages/v1
dir: packages/v1
optional: true
v2:
aliases: ["l", "lp"]
taskfile: packages/v2
dir: packages/v2
optional: true
#
# global vars: https://taskfile.dev/#/usage?id=variables
#
vars:
VAR1: "some-var"
# global env:
env:
ENV1: testing
# env file:
dotenv:
- .env
################################################################################################
tasks:
default:
cmds:
- echo "hello world"
install:
aliases: [ "i" ]
cmds:
- task: install:bun
install:bun:
cmds:
- curl -fsSL https://bun.sh/install | bash
install:vitepress:
aliases: [ "iv" ]
cmds:
# - pnpm add -D vitepress
# - yarn add -D vitepress
# - npm install -g vitepress
- bun add -D vitepress
env:
aliases: [ "e" ]
cmds:
- bun -v
new:
aliases: [ "n" ]
cmds:
- mkdir -p {{.CLI_ARGS}}
- |
cd {{.CLI_ARGS}}
bun vitepress init
dir: packages/
count:
cmds:
- tokei # 代码统计: https://github.com/XAMPPRocky/tokei
################################################################################
pull:
aliases: [ "pl" ]
cmds:
- git config pull.rebase false
- git pull origin main
fetch:
aliases: [ "f" ]
cmds:
- git fetch
- git rebase
- git merge origin/main
quick:
aliases: [ "q" ]
cmds:
- task: commit
- task: commit
# - task: pull
- task: push
commit:
aliases: [ "c" ]
cmds:
- git add .
- |
git commit -m 'chore: update' --no-verify
ignore_error: true
push:
aliases: [ "p" ]
cmds:
- git push origin main --tags
- |
repo_url=`git remote -v | grep push | awk -F ":" '{print $2}' | awk -F ".git " '{print "https://github.com/"$1}'`;
echo $repo_url;
open $repo_url
echo:
cmds:
- echo $(git remote -v | grep push | awk -F ":" '{print $2}')
- |
repo_url=`git remote -v | grep push | awk -F ":" '{print $2}' | awk -F ".git " '{print "https://github.com/"$1}'`;
echo $repo_url;