-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
116 lines (92 loc) · 2.14 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
version: "3"
output: prefixed # = [interleaved, group, prefixed] # ref:
includes:
dev:
aliases: [ "d" ]
taskfile: ./Taskfile.dev.yml
dir: ./
optional: true
mod:cli:
aliases: [ "cli", "m" ]
taskfile: packages/mod-cli
dir: packages/mod-cli
optional: true
mod:core:
aliases: [ "core" ]
taskfile: packages/mod-cli
dir: packages/mod-cli
optional: true
################################################################################################
#
# global vars: https://taskfile.dev/#/usage?id=variables
#
vars:
VAR1: "some-var"
# global env:
env:
ENV1: testing
# env file:
dotenv:
- .env
################################################################################################
tasks:
list:
aliases: [ "l" ]
cmds:
- task --list-all
- task --list-all | grep dev
- task --list-all | grep cli
- task --list-all | grep core
##################################################################################################
# usage:
# - task n -- py-try/try-jieba
new:
aliases: [ "n" ]
cmds:
- poetry new {{.CLI_ARGS}} --src
dir: packages/
##################################################################################################
fmt:
aliases: [ "f" ]
cmds:
- black .
- ruff . --fix
ignore_error: true
fmt:fix:
aliases: [ "ff" ]
cmds:
- ruff . --fix --unsafe-fixes
ignore_error: true
fmt2:
aliases: [ "f2" ]
cmds:
- isort .
- black .
- flake8 .
ignore_error: true
quick:
aliases: [ 'q' ]
cmds:
- task: cc
- task: push
cc:
cmds:
- task: commit
- task: commit
commit:
aliases: [ 'c' ]
cmds:
- task: fmt
- git add .
- git commit -m "update"
ignore_error: true
pull:
aliases: [ "down" ]
cmds:
- git config pull.rebase false
- git pull origin main
push:
aliases: [ "up" ]
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}'`; open $repo_url