File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -64,16 +64,18 @@ function createProtocolBuffer () {
6464 exit 1
6565 fi
6666
67- " $ROLLUP " \
68- --input " ${WORK_DIR} /onnx_pb.js" \
69- --file " ${LIB_ONNX_DIR} /onnx_pb.js" \
70- --format " esm" \
71- --plugin " @rollup/plugin-commonjs" \
72- --plugin " @rollup/plugin-node-resolve"
73- if [ $? -ne 0 ]; then
74- exit 1
67+ if [ ! -f " ${LIB_ONNX_DIR} /onnx_pb.js" ]; then
68+ " $ROLLUP " \
69+ --input " ${WORK_DIR} /onnx_pb.js" \
70+ --file " ${LIB_ONNX_DIR} /onnx_pb.js" \
71+ --format " esm" \
72+ --plugin " @rollup/plugin-commonjs" \
73+ --plugin " @rollup/plugin-node-resolve"
74+ if [ $? -ne 0 ]; then
75+ exit 1
76+ fi
77+ sed -i " 1ivar window = typeof window !== 'undefined' ? window : null; var self = typeof self !== 'undefined' ? self : null;" " ${LIB_ONNX_DIR} /onnx_pb.js"
7578 fi
76- sed -i " 1ivar window = typeof window !== 'undefined' ? window : null; var self = typeof self !== 'undefined' ? self : null;" " ${LIB_ONNX_DIR} /onnx_pb.js"
7779
7880 cp " ${WORK_DIR} /onnx_pb.d.ts" " ${LIB_ONNX_DIR} "
7981 sed -i -e ' s/"google-protobuf"/".\/google-protobuf.js"/' " ${LIB_ONNX_DIR} /onnx_pb.d.ts"
You can’t perform that action at this time.
0 commit comments