返回 DeepSeek-Reasonix
fetch-stable-release-manifest.sh
根目录 / scripts / fetch-stable-release-manifest.sh
1 #!/usr/bin/env bash
2 # Public machine endpoint: no credentials, alternate host, or challenge bypass.
3 set -euo pipefail
4 test "$#" -eq 2 || { echo 'usage: fetch-stable-release-manifest.sh VERSION OUTPUT' >&2; exit 2; }
5 version="$1"
6 [[ "$version" =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]] || { echo 'Stable manifest probe requires a stable version' >&2; exit 2; }
7 output="$2"
8 script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
9 # Use the shipped updater's Go HTTP stack. On Actions runners, curl and Node
10 # can receive a Cloudflare challenge for the same public URL and User-Agent.
11 go run "$script_dir/release-manifest-fetch/main.go" "$version" "$output"
12
12 lines BASH