Last active
September 5, 2025 07:53
-
-
Save jmesnil/6e7743716fd9abb388a560642a0d0d68 to your computer and use it in GitHub Desktop.
Script to install the latest release of WildFly Glow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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