AGPL-3.0-only, a source link in the app, and everything on dev since #5 #6

Merged
bvandeusen merged 214 commits from dev into main 2026-10-21 21:40:00 -04:00
Showing only changes of commit 544cf72735 - Show all commits
+7 -27
View File
@@ -10,7 +10,10 @@
# Both are fixed-tag releases: the tag never moves and the assets are pruned to the
# current build, so the tag alone names the newest one. `stable` only became one in
# M314 step 3, when `main` started publishing — before that it was a manifest-only
# pointer at whatever `v*` tag somebody had last cut.
# pointer at whatever `v*` tag somebody had last cut, and this script carried a
# fallback that chased the `v*` release its manifest named. That came out once
# `main` had published to `stable` for real (`b6673c6`); the two channels are the
# same shape now and nothing here should special-case one of them again.
# Pick one with `--channel dev` or `TS_CHANNEL=dev`. Through a pipe the options go
# after a `--`: curl -fsSL <url> | sh -s -- --channel dev
#
@@ -86,36 +89,13 @@ esac
# --- resolve the release for this channel -----------------------------------
say "Finding the latest ThoughtSync build on the $channel channel…"
# ONE lookup for both channels now. Each is a release whose tag never moves and whose
# assets are pruned to the current build, so the tag alone names the newest build on
# that channel — which is exactly what an installer wants and what the in-app updater
# ONE lookup, both channels. Each is a release whose tag never moves and whose assets
# are pruned to the current build, so the tag alone names the newest build on that
# channel — which is exactly what an installer wants and what the in-app updater
# already reads.
json="$(curl -fsSL "$API/releases/tags/$channel" 2>/dev/null)" ||
die "the $channel channel has nothing published yet."
# TRANSITIONAL — delete with the rest of the old scheme (M314 step 7).
#
# `stable` existed before this as a manifest-ONLY pointer: `latest.json` naming a
# version whose bundles lived on a separate `v<version>` release. Between this commit
# and the first merge to `main` it still looks like that, and `stable` is the DEFAULT
# channel — so without this fallback `curl … | sh` is broken for everyone in that
# window. It costs nothing once main has published: the grep finds the bundles and
# this branch never runs again.
if [ "$channel" = "stable" ] && ! printf '%s' "$json" | grep -q "releases/download/stable/[^\"]*\.\(AppImage\|deb\|pkg\.tar\)"; then
say "stable has no bundles of its own yet — falling back to the version its manifest names."
manifest="$(curl -fsSL "$INSTANCE/$REPO/releases/download/stable/latest.json" 2>/dev/null || true)"
stable_version="$(printf '%s' "$manifest" |
grep -oE '"version"[[:space:]]*:[[:space:]]*"[^"]+"' | head -1 |
sed -E 's/.*"([^"]+)"$/\1/')"
if [ -n "$stable_version" ]; then
json="$(curl -fsSL "$API/releases/tags/v$stable_version" 2>/dev/null)" ||
die "the stable channel names $stable_version, but there is no v$stable_version release to install."
else
json="$(curl -fsSL "$API/releases/latest" 2>/dev/null)" ||
die "no stable build published yet — try --channel dev, or merge to main."
fi
fi
# Pull asset URLs straight out of the release JSON (no jq). Anchored on the closing
# quote so a `…AppImage.sig` URL can't be truncated into a match of its own.
asset_url() {