-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_gen.sh
More file actions
executable file
·23 lines (20 loc) · 836 Bytes
/
test_gen.sh
File metadata and controls
executable file
·23 lines (20 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
# script to support with quick execution and code inspection on generator changes
# runs code generator via scala-cli for given config
# will ouput code under test-local/src/main/scala
spec=aiplatform
version=v1
json_codec=jsoniter
http_source=sttp4
array_type=ziochunk
out_dir=test-local/src/main/scala/test-$spec-$version/$http_source/$spec/$json_codec
rm -rf $out_dir && mkdir -p $out_dir
echo "running generator for $spec to $out_dir"
scala modules/cli/src/main/scala/cli.scala -- \
-specs=modules/test-resources/src/main/resources/${spec}_${version}.json \
-out-dir=$out_dir \
-out-pkg=gcp.${spec}.${version}.${http_source}.${json_codec}.$array_type \
-http-source=$http_source \
-json-codec=$json_codec \
-jsoniter-json-type=_root_.example.jsoniter.Json \
-array-type=$array_type