Use babashka to properly wait exporter compilation.

This commit is contained in:
Andrey Antukh 2021-03-31 11:36:29 +02:00
parent 3ddc95d4b5
commit 88a3548d7e
2 changed files with 5 additions and 14 deletions

View file

@ -1,16 +1,5 @@
#!/usr/bin/env bash
set -e
wait_file() {
local file="$1"; shift
local wait_seconds="${1:-10}"; shift # 10 seconds as default timeout
until test $((wait_seconds--)) -eq 0 -o -f "$file" ; do sleep 1; done
((++wait_seconds))
}
wait_file "target/app.js" 120 && {
node target/app.js
}
bb -i '(babashka.wait/wait-for-port "localhost" 9630)';
bb -i '(babashka.wait/wait-for-path "target/app.js")';
node target/app.js