Skip to content

Commit

Permalink
fix (build): Make build-execjar work when current working dir is not …
Browse files Browse the repository at this point in the history
…root
  • Loading branch information
vorburger committed Jan 13, 2025
1 parent 90dee7c commit 96fcf50
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tools/distro/build-execjar.bash
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

# Build the end-user distributed executable fat über JAR

mkdir -p site/download/latest/
THIS="$(dirname "$(realpath "$0")")"
ROOT="$THIS"/../..

mkdir -p "$ROOT"/site/download/latest/
set -euox pipefail

if [ -x "$(command -v gbazelisk)" ]; then
Expand All @@ -34,6 +37,6 @@ fi
# NB: "bazelisk build //..." does *NOT* build *_deploy.jar, for some reason
"$BZL" build --color=yes //java/dev/enola/cli:enola_deploy.jar

cp tools/distro/execjar-header.bash site/download/latest/enola
cat bazel-bin/java/dev/enola/cli/enola_deploy.jar >>site/download/latest/enola
chmod +x site/download/latest/enola
cp "$ROOT"/tools/distro/execjar-header.bash "$ROOT"/site/download/latest/enola
cat "$ROOT"/bazel-bin/java/dev/enola/cli/enola_deploy.jar >>"$ROOT"/site/download/latest/enola
chmod +x "$ROOT"/site/download/latest/enola

0 comments on commit 96fcf50

Please sign in to comment.