diff --git a/script/compile b/script/compile index ac925a5a..9c5fa7f6 100755 --- a/script/compile +++ b/script/compile @@ -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 \