Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Allow installing prerelease CLI with install.sh
  • Loading branch information
ellismg committed Jan 21, 2026
commit bc44fc185251f91a5ff01557e732f98f0d324425
22 changes: 18 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,31 @@ case "$(uname -m)" in
esac

# Determine download URL based on VERSION
if [ -n "$VERSION" ]; then
if [ "${VERSION}" = "latest" ] || [ -z "$VERSION" ]; then
DOWNLOAD_URL="https://github.com/github/copilot-cli/releases/latest/download/copilot-${PLATFORM}-${ARCH}.tar.gz"
CHECKSUMS_URL="https://github.com/github/copilot-cli/releases/latest/download/SHA256SUMS.txt"
elif [ "${VERSION}" = "prerelease" ]; then
# Get the latest prerelease tag
if ! command -v git >/dev/null 2>&1; then
echo "Error: git is required to install prerelease versions" >&2
exit 1
fi
Comment thread
ellismg marked this conversation as resolved.
VERSION="$(git ls-remote --tags https://github.com/github/copilot-cli | tail -1 | awk -F/ '{print $NF}')"
Comment thread
ellismg marked this conversation as resolved.
if [ -z "$VERSION" ]; then
echo "Error: Could not determine prerelease version" >&2
exit 1
fi
echo "Latest prerelease version: $VERSION"
DOWNLOAD_URL="https://github.com/github/copilot-cli/releases/download/${VERSION}/copilot-${PLATFORM}-${ARCH}.tar.gz"
CHECKSUMS_URL="https://github.com/github/copilot-cli/releases/download/${VERSION}/SHA256SUMS.txt"
Comment thread
ellismg marked this conversation as resolved.
else
# Prefix version with 'v' if not already present
case "$VERSION" in
v*) ;;
*) VERSION="v$VERSION" ;;
esac
DOWNLOAD_URL="https://github.com/github/copilot-cli/releases/download/${VERSION}/copilot-${PLATFORM}-${ARCH}.tar.gz"
CHECKSUMS_URL="https://github.com/github/copilot-cli/releases/download/${VERSION}/SHA256SUMS.txt"
else
DOWNLOAD_URL="https://github.com/github/copilot-cli/releases/latest/download/copilot-${PLATFORM}-${ARCH}.tar.gz"
CHECKSUMS_URL="https://github.com/github/copilot-cli/releases/latest/download/SHA256SUMS.txt"
fi
echo "Downloading from: $DOWNLOAD_URL"

Expand Down