Deprecate NATIVE_IMAGE variable

This commit is contained in:
Michiel Borkent 2020-01-09 11:11:12 +01:00
parent 11b4c15bd7
commit a7940ad85c

View file

@ -2,19 +2,13 @@
set -eo pipefail
NATIVE_IMAGE=`which native-image` || true
if [ -z "$NATIVE_IMAGE" ]; then
if [ -z "$GRAALVM_HOME" ]; then
echo "Please set GRAALVM_HOME"
exit 1
fi
"$GRAALVM_HOME/bin/gu" install native-image || true
NATIVE_IMAGE="$GRAALVM_HOME/bin/native-image"
if [ -z "$GRAALVM_HOME" ]; then
echo "Please set GRAALVM_HOME"
exit 1
fi
"$GRAALVM_HOME/bin/gu" install native-image || true
BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
# # We also need to AOT sci, else something didn't work in the Mac build on CircleCI
@ -23,10 +17,12 @@ BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
# mkdir -p src/sci
# cp -R /tmp/sci/src/* src
export JAVA_HOME=$GRAALVM_HOME
lein with-profiles +reflection do run
lein do clean, uberjar
$NATIVE_IMAGE \
$GRAALVM_HOME/bin/native-image \
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
-H:Name=bb \
-H:+ReportExceptionStackTraces \