diff --git a/script/compile b/script/compile index fc9b2faa..bf50884e 100755 --- a/script/compile +++ b/script/compile @@ -116,3 +116,5 @@ then fi "$GRAALVM_HOME/bin/native-image" "${args[@]}" "$@" + +$BABASHKA_BINARY describe diff --git a/script/compile.bat b/script/compile.bat index 1304c888..a78af136 100644 --- a/script/compile.bat +++ b/script/compile.bat @@ -46,3 +46,4 @@ call %GRAALVM_HOME%\bin\native-image.cmd ^ if %errorlevel% neq 0 exit /b %errorlevel% call bb "(+ 1 2 3)" +call bb describe diff --git a/src/babashka/main.clj b/src/babashka/main.clj index 9fade048..a2f735bb 100644 --- a/src/babashka/main.clj +++ b/src/babashka/main.clj @@ -110,7 +110,7 @@ (def version common/version) -(def build-commit-sha (System/getenv "BABASHKA_SHA")) +(def build-commit-sha (or (System/getenv "BABASHKA_SHA") "")) (defn parse-version [version] (mapv #(Integer/parseInt %) @@ -263,6 +263,7 @@ Use bb run --help to show this help output. (format (str/trim " {:babashka/version \"%s\"%s + :git/sha \"%s\" :feature/csv %s :feature/java-nio %s :feature/java-time %s @@ -283,9 +284,7 @@ Use bb run --help to show this help output. :feature/logging %s :feature/priority-map %s}") version - (if (or (nil? build-commit-sha) (str/blank? build-commit-sha)) - "" - (format " \n:git/sha \"%s\"" build-commit-sha)) + build-commit-sha features/csv? features/java-nio? features/java-time?