Files
DeepSeek-Reasonix/scripts/studio-release-flags.sh
T
yhh b7541b7c80 release(studio): stable releases become GitHub latest, without a root latest.json
A stable studio-vX.Y.Z that is the highest stable studio tag is created with
--latest and without --prerelease. Candidates (-preview.N, -rc.N) keep
--prerelease --latest=false, and recovering an older stable tag does not take
latest back. The decision lives in scripts/studio-release-flags.sh and reads
the tag grammar, not wording.

The GitHub release no longer carries a root latest.json. The 1.x desktop
updaters fall back to releases/latest/download/latest.json, and builds up to
1.18 do not validate the manifest and share Studio's minisign key, so a
Studio manifest there would offer them a Studio package. The file stays in
the R2 mirror under <tag>/, which is the only place Studio reads it. The
release now has 21 assets.

Adds a flags-script test and a workflow contract test, and updates the
runbook, READMEs, MIGRATING and ROADMAP.
2026-10-04 20:25:37 -07:00

32 lines
894 B
Bash
Executable File

#!/usr/bin/env bash
# Prints the `gh release create` flags that decide how GitHub ranks a Studio
# release, one per line. Usage: studio-release-flags.sh <tag> <candidate>,
# with the repository's studio-v* tags on stdin.
#
# A candidate (semver prerelease segment) is a prerelease and never latest. A
# stable tag is latest only when no higher stable studio tag exists, so
# recovering an older tag cannot take the badge back from a newer release.
set -euo pipefail
tag="${1:?tag}"
candidate="${2:?candidate}"
if [ "$candidate" = "true" ]; then
printf '%s\n' --prerelease --latest=false
exit 0
fi
stable='^studio-v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$'
highest="$(
{ grep -E "$stable" || true; } |
sed 's/^studio-v//' |
sort -t. -k1,1n -k2,2n -k3,3n |
tail -n 1
)"
if [ "studio-v$highest" = "$tag" ]; then
printf '%s\n' --latest
else
printf '%s\n' --latest=false
fi