Files
iLSP/scripts/download_bicep_ls.sh

32 lines
885 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# Download Bicep Language Server at Docker build time.
# Uses the official GitHub releases — no VS Code needed.
set -euo pipefail
BICEP_VERSION="${BICEP_VERSION:-latest}"
DEST="/opt/bicep-langserver"
ZIP="/tmp/bicep-langserver.zip"
mkdir -p "$DEST"
if [ "$BICEP_VERSION" = "latest" ]; then
URL="https://github.com/Azure/bicep/releases/latest/download/bicep-langserver.zip"
else
URL="https://github.com/Azure/bicep/releases/download/${BICEP_VERSION}/bicep-langserver.zip"
fi
echo "Downloading Bicep Language Server from: $URL"
curl -fsSL "$URL" -o "$ZIP"
unzip -q "$ZIP" -d "$DEST"
rm "$ZIP"
# Verify the DLL is present
if [ ! -f "$DEST/Bicep.LangServer.dll" ]; then
echo "ERROR: Bicep.LangServer.dll not found in $DEST" >&2
ls -la "$DEST" >&2
exit 1
fi
echo "Bicep Language Server installed at $DEST"
ls -lh "$DEST/Bicep.LangServer.dll"