Skip to content

Commit

Permalink
Move ASDF plugin installation into Cloudflare ENV vars
Browse files Browse the repository at this point in the history
We have to use the `UNSTABLE_PRE_BUILD` env var in our build process to get the asdf `java` plugin
installed before the build system installs the tool versions defined in our `.tool-versions` file.

I'm wary of using an ENV var labeled "UNSTABLE", as it might disappear without warning, but also
this project has effectively no risk, so I'm going to go with the ease of use it affords us.
  • Loading branch information
futuro committed Sep 18, 2023
1 parent d8fc350 commit 0ba8177
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
#!/bin/bash

echo "Inspecting asdf plugins"
asdf info
asdf plugin list

echo "Beginning build"

# This will auto-succeed in the CI environment, but I've kept it here in case others come to use the
# script
echo "installing asdf java plugin"
asdf plugin add java https://github.com/halcyon/asdf-java.git

echo "Installing local versions"
asdf install

# echo "Fetching JDK"
# # Grab the java binary and put it in our path
# wget https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8%2B7/OpenJDK17U-jre_x64_linux_hotspot_17.0.8_7.tar.gz
# # When transform the initial directory name into something static, to make it easier to work with
# tar --gzip --transform 's,^[^/]+,jdk,x' --extract --file OpenJDK17U-jre_x64_linux_hotspot_17.0.8_7.tar.gz
# export PATH=$PWD/jdk/bin:$PATH

echo "Building release"
npx shadow-cljs release :client

0 comments on commit 0ba8177

Please sign in to comment.