Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,15 @@ jobs:
with:
path: dist-bin
merge-multiple: true # flatten all per-target artifacts into one dir
- name: Checksums
- name: Checksums + compress
run: |
cd dist-bin
# Checksum the RAW binaries first — install.sh verifies the DECOMPRESSED artifact
# (what actually runs), so SHA256SUMS lists raw-binary hashes.
sha256sum insta-* > SHA256SUMS
# gzip the unix binaries (~60MB → ~20MB download). Leave the Windows .exe raw
# (manual download). install.sh fetches <asset>.gz and gunzips.
for f in insta-darwin-* insta-linux-*; do gzip -f "$f"; done
ls -lh
cat SHA256SUMS
- name: Resolve tag
Expand Down
15 changes: 11 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,18 @@ fi
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

echo "Installing $BIN ($asset, $version) — downloading ~60MB…"
# --progress-bar (not -s): the binary is ~60MB, so a silent download looks frozen. Show progress
# to a TTY; stay quiet when piped without one. Keep the tiny SHA256SUMS fetch silent.
# --progress-bar (not -s): a silent download looks frozen. Show progress to a TTY; stay quiet
# when piped without one. Keep the tiny SHA256SUMS fetch silent.
if [ -t 2 ]; then dl="curl -fL --progress-bar"; else dl="curl -fsSL"; fi
$dl "$base/$asset" -o "$tmp/$BIN" || { echo "error: download failed ($base/$asset)" >&2; exit 1; }
# Prefer the gzipped asset (~3× smaller); fall back to the raw binary for older releases.
if curl -fsSL -I "$base/$asset.gz" >/dev/null 2>&1; then
echo "Installing $BIN ($asset, $version) — downloading ~20MB…"
$dl "$base/$asset.gz" -o "$tmp/$BIN.gz" || { echo "error: download failed ($base/$asset.gz)" >&2; exit 1; }
gunzip "$tmp/$BIN.gz" || { echo "error: could not decompress $asset.gz" >&2; exit 1; }
else
echo "Installing $BIN ($asset, $version) — downloading ~60MB…"
$dl "$base/$asset" -o "$tmp/$BIN" || { echo "error: download failed ($base/$asset)" >&2; exit 1; }
fi
curl -fsSL "$base/SHA256SUMS" -o "$tmp/SHA256SUMS" || { echo "error: could not fetch SHA256SUMS" >&2; exit 1; }

# ---- verify checksum ----
Expand Down
Loading