ci / build (push) Canceled after 0s
Commands: login/logout/whoami, deploy (TUI + plain/JSON/CI), logs, status, open, list, version. - deploy pipeline: tar.gz source (gitignore/dockerignore aware) -> presigned upload -> cloud kaniko/buildpacks build -> live URL - bubbletea/lipgloss TUI with upload progress + live log streaming; auto-falls-back to plain output in CI - apiclient against the gateway /v1/deployments + /v1/apps endpoints - GitHub Action (action.yml) + example workflow + install script
55 lines
1.4 KiB
Bash
55 lines
1.4 KiB
Bash
#!/bin/sh
|
|
# Install the gy CLI.
|
|
#
|
|
# Usage:
|
|
# curl -fsSL https://install.ghaymah.systems | sh
|
|
#
|
|
# Override the download location / install dir with:
|
|
# GY_DOWNLOAD_BASE=https://github.com/ghaymah/gy/releases/latest/download
|
|
# GY_INSTALL_DIR=$HOME/.local/bin
|
|
set -eu
|
|
|
|
# Where releases are hosted. Point this at the real release bucket/URL.
|
|
DOWNLOAD_BASE="${GY_DOWNLOAD_BASE:-https://github.com/ghaymah/gy/releases/latest/download}"
|
|
INSTALL_DIR="${GY_INSTALL_DIR:-$HOME/.local/bin}"
|
|
VERSION="${GY_VERSION:-latest}"
|
|
|
|
os="$(uname -s | tr '[:upper:]' '[:lower:]')"
|
|
arch="$(uname -m)"
|
|
case "$arch" in
|
|
x86_64|amd64) arch="amd64" ;;
|
|
aarch64|arm64) arch="arm64" ;;
|
|
*) echo "unsupported arch: $arch" >&2; exit 1 ;;
|
|
esac
|
|
|
|
case "$os" in
|
|
linux|darwin) ;;
|
|
*) echo "unsupported os: $os" >&2; exit 1 ;;
|
|
esac
|
|
|
|
bin="gy_${os}_${arch}"
|
|
if [ "$os" = "windows" ]; then bin="gy_${os}_${arch}.exe"; fi
|
|
|
|
url="$DOWNLOAD_BASE/$bin"
|
|
tmp="$(mktemp)"
|
|
trap 'rm -f "$tmp"' EXIT
|
|
|
|
echo "→ downloading gy ($bin)…"
|
|
if command -v curl >/dev/null 2>&1; then
|
|
curl -fsSL "$url" -o "$tmp"
|
|
elif command -v wget >/dev/null 2>&1; then
|
|
wget -q "$url" -O "$tmp"
|
|
else
|
|
echo "error: need curl or wget" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$INSTALL_DIR"
|
|
install -m 0755 "$tmp" "$INSTALL_DIR/gy"
|
|
echo "✔ installed gy to $INSTALL_DIR/gy"
|
|
echo
|
|
echo "Next:"
|
|
echo " export PATH=\"$INSTALL_DIR:\$PATH\""
|
|
echo " gy login"
|
|
echo " gy deploy"
|