mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-21 01:56:15 +00:00
Release notes previously pointed at the flat, alphabetical Assets list, forcing readers to hunt for their platform's soundtouch-service or soundtouch-cli build. Generate direct per-platform links (with inline checksum links, one row per OS/arch) from the deterministic asset naming convention, and wire it into both release paths: the auto-generated notes (create_release) and the hand-authored notes a maintainer publishes via the GitHub web UI (update_release, which now replaces the Downloads footer line in place). The footer-replace logic always goes through the same strip-then-append path so re-running the job for the same tag stays byte-for-byte idempotent. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
60 lines
2.1 KiB
Bash
Executable File
60 lines
2.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Emits a "Quick downloads" markdown section with real, direct download
|
|
# links for soundtouch-service and soundtouch-cli, one row per platform.
|
|
# Asset URLs are deterministic (<binary>-<tag>-<os>-<arch>[.exe]), so this
|
|
# needs no GitHub API call to build them.
|
|
#
|
|
# Usage: quick-downloads.sh <tag-name> <owner/repo>
|
|
# Output goes to stdout, wrapped in <!-- quick-downloads:start/end -->
|
|
# markers so callers can find-and-replace a previously inserted block.
|
|
|
|
set -euo pipefail
|
|
|
|
TAG_NAME="$1"
|
|
REPOSITORY="$2"
|
|
BASE_URL="https://github.com/${REPOSITORY}/releases/download/${TAG_NAME}"
|
|
|
|
# suffix|human label, same order as docs/content/docs/downloads/_index.md
|
|
PLATFORMS=(
|
|
"linux-arm64|Raspberry Pi (64-bit) / ARM64 Linux"
|
|
"linux-armv7|Raspberry Pi (32-bit) / ARMv7"
|
|
"linux-amd64|Linux (64-bit PC)"
|
|
"darwin-arm64|macOS (Apple Silicon)"
|
|
"darwin-amd64|macOS (Intel)"
|
|
"windows-amd64.exe|Windows (64-bit)"
|
|
"freebsd-amd64|FreeBSD (64-bit)"
|
|
)
|
|
|
|
build_table() {
|
|
local BINARY_NAME=$1
|
|
echo "| Platform | Download | Checksum |"
|
|
echo "|---|---|---|"
|
|
for ENTRY in "${PLATFORMS[@]}"; do
|
|
local SUFFIX="${ENTRY%%|*}"
|
|
local LABEL="${ENTRY##*|}"
|
|
local FILENAME="${BINARY_NAME}-${TAG_NAME}-${SUFFIX}"
|
|
echo "| ${LABEL} | [${FILENAME}](${BASE_URL}/${FILENAME}) | [sha256](${BASE_URL}/${FILENAME}.sha256) |"
|
|
done
|
|
}
|
|
|
|
SERVICE_TABLE="$(build_table soundtouch-service)"
|
|
CLI_TABLE="$(build_table soundtouch-cli)"
|
|
|
|
cat << EOF
|
|
<!-- quick-downloads:start -->
|
|
## Quick downloads
|
|
|
|
Most people only need one of these two:
|
|
|
|
**soundtouch-service** — the local server that replaces the Bose cloud. Point your speaker at it and you keep full control; the built-in web UI on port 8000 handles setup.
|
|
|
|
$SERVICE_TABLE
|
|
|
|
**soundtouch-cli** — command-line control of any device: playback, presets, sources, multiroom zones, discovery, and migration. Good for scripting and home automation.
|
|
|
|
$CLI_TABLE
|
|
|
|
Everything else (soundtouch-player, soundtouch-backup, other platforms, Docker, install scripts): [Downloads page](https://gesellix.github.io/Bose-SoundTouch/docs/downloads/).
|
|
<!-- quick-downloads:end -->
|
|
EOF
|