-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.toml
194 lines (162 loc) · 3.04 KB
/
Makefile.toml
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
[tasks."add:submodules"]
script = '''
git submodule update --init
'''
[tasks."install:dev"]
script = '''
brew install jq jo yj
brew install fuyutarow/tap/tests-make
brew install fuyutarow/tap/version-make
cargo install cargo-distribute
npm i -g markdown-to-document ;: use mdtodoc for publish:README
'''
[tasks."release:readme"]
# GitHub Flavored Markdown (GFM) does not support footnotes. So use `mdtodoc` to convert markdown to html.
script = '''
mdtodoc _readme/README.md -e light
'''
[tasks.pq]
script = '''
cargo run --bin pq --features cli --
'''
[tasks."build:all"]
script = '''
makers build:pq
makers build:py
makers build:js
'''
[tasks."build:pq"]
args = ["build", "--bin", "pq", "--features", "cli table"]
command = "cargo"
[tasks."build:js"]
script = '''
cd piqel-js
makers build:js
'''
[tasks."install:dev:py"]
script = '''
cd piqel-py
makers update:py
'''
[tasks."build:py"]
script = '''
cd piqel-py
makers build:py
'''
[tasks.release]
args = ["build", "--release"]
command = "cargo"
[tasks."release:pq"]
args = ["build", "--bin", "pq", "--release", "--features", "cli table"]
command = "cargo"
[tasks."release:js"]
script = '''
cd piqel-js
makers release:js
'''
[tasks."publish:rs"]
dependencies = ["release"]
script = '''
cargo publish
'''
[tasks."publish:js"]
script = '''
cd piqel-js
makers publish:js
'''
[tasks."publish:py"]
script = '''
cd piqel-py
makers publish:py
'''
[tasks.cov]
script = '''
cargo kcov
'''
[tasks.lint]
script = '''
cargo fix --allow-dirty
cargo fmt
'''
[tasks.test]
alias = "test:all"
[tasks."test:all"]
script = '''
makers test:lib
makers test:pq
makers test:py
'''
[tasks."test:lib"]
args = ["test"]
command = "cargo"
dependencies = ["build"]
[tasks."test:pq"]
dependencies = ["build:pq"]
script = '''
tests-make tests-make/index.toml
'''
[tasks."test:pqrs"]
dependencies = ["build:pq"]
script = '''
makers test:lib
makers test:pq
'''
[tasks."test:py"]
script = '''
cd piqel-py
makers test:py
'''
[tasks."web:dev"]
script = '''
cd examples/next
npm run dev
'''
[tasks."web:prod"]
script = '''
cd examples/next
npm run up:partiql
npm run prod
'''
[tasks."test:web"]
script = '''
tests-make tests-make/web.toml
'''
[tasks."dist:up"]
script = '''
cargo-distribute --tap ~/homebrew-tap/ --bin pq --features "cli table" --channel nightly
'''
[tasks.up]
script = '''
git remote add upstream https://github.com/fuyutarow/piqel
git fetch upstream
git merge upstream/alpha
'''
[tasks."version:up"]
script = '''
version-make up -rz Cargo.toml
version-make up -rz piqel-js/Cargo.toml
version-make up -rz piqel-py/Cargo.toml
# version-make set piqel-js/Cargo.toml -v "$(version-make show Cargo.toml)" -r
'''
[tasks."version:tag"]
script = '''
git tag v$(version-make show Cargo.toml)
'''
[tasks."version:untag"]
script = '''
git tag v$(version-make show Cargo.toml) -d
'''
[tasks.generate-json]
dependencies = ["build"]
script = '''
alias pc="./target/debug/partiql-cli"
alias pq="./target/debug/pq"
for i in $(seq 1 18)
cat samples/q$i.env | pc from --to json | pq -S > samples/q$i.json
'''
[tasks."doc:start"]
script = '''
cd docs
yarn
yarn start
'''