Skip to content

Instantly share code, notes, and snippets.

@jmesnil
Last active September 5, 2025 07:53
Show Gist options
  • Select an option

  • Save jmesnil/6e7743716fd9abb388a560642a0d0d68 to your computer and use it in GitHub Desktop.

Select an option

Save jmesnil/6e7743716fd9abb388a560642a0d0d68 to your computer and use it in GitHub Desktop.
Script to install the latest release of WildFly Glow
#!/usr/bin/env sh
REPO="wildfly/wildfly-glow"
if [ -n "${GLOW_VERSION}" ]; then
echo "πŸ” Fetching ${GLOW_VERSION} release from GitHub..."
url="https://github.com/$REPO/releases/download/$GLOW_VERSION/wildfly-glow-$GLOW_VERSION.zip"
else
echo "πŸ” Fetching latest release from GitHub..."
url=$(curl -s https://api.github.com/repos/$REPO/releases/latest \
| grep "browser_download_url" \
| cut -d '"' -f 4)
fi
if [ -z "$url" ]; then
echo "❌ Could not find a release asset to download."
exit 1
fi
echo "⬇️ Downloading: $url"
curl -sLf -o "wildfly-glow.zip" $url
if [ $? -ne 0 ]; then
echo "❌ Error downloading WildFly Glow from $url" 1>&2
exit $retval
fi
echo "πŸ“¦ Extracting WildFly Glow..."
unzip -q "./wildfly-glow.zip" -d .
# detect extracted directory (e.g., wildlfy-glow-1.3.0.Final)
DIR=$(unzip -Z -1 "./wildfly-glow.zip" |head -n1)
rm ./wildfly-glow.zip
# remove existing directory
rm -rf wildfly-glow
mv $DIR wildfly-glow
echo "πŸš€ Installing to $(pwd)/wildfly-glow"
# clean up
rm -rf wildfly-glow/examples
GLOW_VERSION=$(./wildfly-glow/wildfly-glow --version)
echo "βœ… Installation of WildFly Glow $GLOW_VERSION complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment