File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -e
3+
4+ BACKEND=${BACKEND:- bb}
5+
6+ cd $( dirname " $0 " ) /../
7+
8+ artifacts_path=" ./export"
9+ artifacts=$( ls $artifacts_path )
10+
11+ echo " {\" programs\" : [" > gates_report.json
12+
13+ # Bound for checking where to place last parentheses
14+ NUM_ARTIFACTS=$( ls -1q " $artifacts_path " | wc -l)
15+
16+ ITER=" 1"
17+ for artifact in $artifacts ; do
18+ ARTIFACT_NAME=$( basename " $artifact " )
19+
20+ GATES_INFO=$( $BACKEND gates -b " $artifacts_path /$artifact " )
21+ MAIN_FUNCTION_INFO=$( echo $GATES_INFO | jq -r ' .functions[0] | .name = "main"' )
22+ echo " {\" package_name\" : \" $ARTIFACT_NAME \" , \" functions\" : [$MAIN_FUNCTION_INFO ]" >> gates_report.json
23+
24+ if (( $ITER == $NUM_ARTIFACTS )) ; then
25+ echo " }" >> gates_report.json
26+ else
27+ echo " }, " >> gates_report.json
28+ fi
29+
30+ ITER=$(( $ITER + 1 ))
31+ done
32+
33+ echo " ]}" >> gates_report.json
34+
35+
You can’t perform that action at this time.
0 commit comments