This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
167 lines (137 loc) · 3.13 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
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
version: "3"
output: prefixed # = [interleaved, group, prefixed] # ref:
#
# ref: https://taskfile.dev/zh-Hans/usage/
#
includes:
mojo:
aliases: [m]
taskfile: packages/mojo-101/
dir: packages/mojo-101/
optional: true #
docs:
aliases: [d]
taskfile: packages/mojo-manual/
dir: packages/mojo-manual/
optional: true #
std:
aliases: [s]
taskfile: packages/mojo-std/
dir: packages/mojo-std/
optional: true #
cli:
taskfile: packages/mojo-cli/
dir: packages/mojo-cli/
optional: true #
ffi:
aliases: [c, f]
taskfile: packages/mojo-ffi/
dir: packages/mojo-ffi/
optional: true #
try:
aliases: [t]
taskfile: packages/try/
dir: packages/try/
optional: true #
################################################################################################
#
# global vars: https://taskfile.dev/#/usage?id=variables
#
vars:
VAR1: "some-var"
# global env:
env:
ENV1: testing
# env file:
dotenv:
- .env
################################################################################################
tasks:
all:
aliases: [a]
cmds:
- task --list-all
setup:
cmds:
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
- pyenv install 3.10.6
- pyenv virtualenv 3.10.6 py310
- pyenv local py310
- pip install --upgrade pip
- pip install -U pipx
- pipx ensurepath
- pipx --version
install:tools:
cmds:
- pipx install cookiecutter
- cookiecutter --version
- pipx install poetry
- poetry --version
- poetry config virtualenvs.in-project true
- poetry config --list
install:m1:
cmds:
- modular --help
- modular upgrade mojo
- mojo --version
init:
cmds:
- task init:env
init:env:
cmds:
- cp .env.local .env
##################################################################################################
#
# cli args:
# - usage: task n -- try/try-pkg
#
n:
cmds:
- poetry new {{.CLI_ARGS}} --src
dir: packages/
new:
cmds:
- poetry new ${NEW_PROJECT_NAME} --src
dir: packages/
new2:
dir: packages
cmds:
- cookiecutter gh:jacebrowning/template-python -f
info:
cmds:
- echo {{now | date "2006-01-02"}}
- echo '{{OS}} {{ARCH}}'
# - task --list-all
##################################################################################################
qq:
cmds:
- task: pull
- task: q
q:
aliases: [quick]
cmds:
- task: cc
- task: push
cc:
cmds:
- task: commit
- task: commit
# - task: pull
# - task: push
c:
aliases: [commit]
cmds:
- git status
- git add .
- git commit -m "update"
ignore_error: true
pull:
aliases: [pl]
cmds:
- git config pull.rebase false
- git pull origin main
push:
aliases: [ps]
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