Support PATH native-image on *nix-likes (#33)
This commit is contained in:
parent
89c555b6d8
commit
da4714b5dd
1 changed files with 12 additions and 6 deletions
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
|
NATIVE_IMAGE=`which native-image` || true
|
||||||
|
|
||||||
|
if [ -z "$NATIVE_IMAGE" ]; then
|
||||||
if [ -z "$GRAALVM_HOME" ]; then
|
if [ -z "$GRAALVM_HOME" ]; then
|
||||||
echo "Please set GRAALVM_HOME"
|
echo "Please set GRAALVM_HOME"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -9,6 +12,9 @@ fi
|
||||||
|
|
||||||
"$GRAALVM_HOME/bin/gu" install native-image || true
|
"$GRAALVM_HOME/bin/gu" install native-image || true
|
||||||
|
|
||||||
|
NATIVE_IMAGE="$GRAALVM_HOME/bin/native-image"
|
||||||
|
fi
|
||||||
|
|
||||||
BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
|
BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
|
||||||
|
|
||||||
# # We also need to AOT sci, else something didn't work in the Mac build on CircleCI
|
# # We also need to AOT sci, else something didn't work in the Mac build on CircleCI
|
||||||
|
|
@ -18,7 +24,7 @@ BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
|
||||||
# cp -R /tmp/sci/src/* src
|
# cp -R /tmp/sci/src/* src
|
||||||
|
|
||||||
lein with-profiles +clojure-1.10.1 do clean, uberjar
|
lein with-profiles +clojure-1.10.1 do clean, uberjar
|
||||||
$GRAALVM_HOME/bin/native-image \
|
$NATIVE_IMAGE \
|
||||||
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
|
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
|
||||||
-H:Name=bb \
|
-H:Name=bb \
|
||||||
-H:+ReportExceptionStackTraces \
|
-H:+ReportExceptionStackTraces \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue