-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
143 lines (119 loc) · 3.22 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
version: "3"
################################################################################################
#
# local dev:
# - run:
# - clean:
#
################################################################################################
#
# sub namespace: https://taskfile.dev/#/usage?id=including-other-taskfiles
#
includes:
app:
taskfile: ./packages/ffi-app/Taskfile.yml
dir: ./packages/ffi-app/
optional: true
binding:
taskfile: ./packages/ffi-binding/Taskfile.yml
dir: ./packages/ffi-binding/
optional: true
zig:
taskfile: ./packages/ffi-core-zig/Taskfile.yml
dir: ./packages/ffi-core-zig/
optional: true
#
# global vars: https://taskfile.dev/#/usage?id=variables
#
vars:
VAR1: "some-var"
# global env:
env:
ENV1: testing
# env file:
dotenv:
- .env
################################################################################################
# task groups:
tasks:
default:
cmds:
- task: init
- task: run
install:
cmds:
- brew tap leoafarias/fvm # flutter version management
- brew install fvm
# - fvm install 2.2.3 # install flutter sdk
- fvm use 2.5.0 # install and use
- pub global activate fvm # update fvm
tool:
cmds:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # install rust
- cargo install svgcleaner # fix svg file meta error
init:
cmds:
- cp .env.local .env
- task: app:init
new:app:
cmds:
- task: new
new:
desc: "create flutter app"
cmds:
- echo "$(pwd) | ${FLUTTER_APP_ROOT} , ${FLUTTER_APP_NAME}, ${FLUTTER_APP_ORG}"
- |
cd ${FLUTTER_APP_ROOT};
fvm flutter create ${FLUTTER_APP_NAME} \
--project-name=${FLUTTER_PROJECT_NAME} \
--org=${FLUTTER_APP_ORG}
new:lib:
desc: "create flutter lib"
cmds:
- echo "$(pwd) | ${FLUTTER_APP_ROOT} , ${FLUTTER_APP_NAME}, ${FLUTTER_APP_ORG}"
- |
cd ${FLUTTER_APP_ROOT};
fvm flutter create ${FLUTTER_APP_NAME} \
--project-name=${FLUTTER_PROJECT_NAME} \
--org=${FLUTTER_APP_ORG} \
--template=package
# ffi binding + plugin
new:plugin:
desc: "create flutter plugin"
cmds:
- echo "$(pwd) | ${FLUTTER_APP_ROOT} , ${FLUTTER_APP_NAME}, ${FLUTTER_APP_ORG}"
- |
cd ${FLUTTER_APP_ROOT};
fvm flutter create ${FLUTTER_APP_NAME} \
--project-name=${FLUTTER_PROJECT_NAME} \
--org=${FLUTTER_APP_ORG} \
--template=plugin \
--platforms=android,ios,linux,macos,windows
new:zig:lib:
cmds:
- mkdir ${NEW_PACKAGE_NAME}; cd ${NEW_PACKAGE_NAME}; zig init-lib
dir: packages/
run:
cmds:
- task: app:run
#########################################################################
stash:
cmds:
- git stash
quick:
cmds:
- task: commit
- task: pull
- task: push
commit:
cmds:
- git add lib/
- git commit -m "update"
push:
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
pull:
cmds:
- git config pull.rebase false
- git pull