From de5cee103b6183bc462a63f5684547dc01ce856c Mon Sep 17 00:00:00 2001 From: ospab Date: Sat, 18 Jul 2026 15:10:57 +0300 Subject: [PATCH 1/2] fix(install): setup wizard is a subcommand now, not a --setup flag Both installers still invoked `ostp --setup` / `ostp.exe --setup` to launch the first-run wizard on a fresh install. The CLI's subcommand refactor (2026-07-08, "Refactor CLI to subcommands") turned `setup` into `Commands::Setup { .. }` with no top-level `--setup` flag left in Args at all, so every fresh install has hit "error: unexpected argument '--setup' found" and dropped the user out of the installer instead of the wizard. Verified `ostp setup --help` parses correctly with the fix. --- scripts/install.ps1 | 2 +- scripts/install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 0b09224..bc8527d 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -138,5 +138,5 @@ Write-Host "No configuration found. Launching setup wizard..." Write-Host "" Push-Location $InstallDir -& .\ostp.exe --setup +& .\ostp.exe setup Pop-Location diff --git a/scripts/install.sh b/scripts/install.sh index 33c89ee..8c27aae 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -238,4 +238,4 @@ echo "No configuration found. Launching setup wizard..." echo "" cd "$INSTALL_DIR" -exec ./ostp --setup --config "$CONFIG_FILE" +exec ./ostp setup --config "$CONFIG_FILE" From 6bc646c8a550f684a9a7a83dc8db26d4234e0e0f Mon Sep 17 00:00:00 2001 From: ospab Date: Tue, 21 Jul 2026 18:41:26 +0300 Subject: [PATCH 2/2] fix(install): alpha/beta self-update actually finds a real release now Direct hotfix to master (like the earlier `ostp setup` wizard fix) - users curl install.sh live from this branch's raw URL for every self-update, so this can't wait for the normal alpha->beta->master promotion. Master's install.sh still had the pre-rename "pre-release" branch check (the alpha->beta rename landed on alpha/beta after this file's last direct hotfix, never reaching master) AND the deeper bug: ostp update -b alpha/-b beta tried to download a GitHub Release literally tagged "alpha"/"beta". No such tag has ever existed - gha.ps1 cuts a fresh VERSIONED tag every release (v0.4.2-beta.4, v0.4.3-alpha.2, ...) - so -b beta fell through to the stable-release path entirely unnoticed (silently "succeeding" with the wrong, older version) while -b alpha 404'd outright. Now queries the full /releases list (newest first, unlike /releases/latest which only ever returns the newest non-prerelease) and takes the first tag_name containing "-alpha"/"-beta". Brings master to parity with alpha's same fix. --- scripts/install.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 8c27aae..1a37b26 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -115,12 +115,18 @@ if [ -n "$TARGET_VERSION" ]; then fi echo "Fetching requested release $LATEST_RELEASE..." else - if [ "$TARGET_BRANCH" == "alpha" ]; then - echo "Fetching alpha release..." - LATEST_RELEASE="alpha" - elif [ "$TARGET_BRANCH" == "pre-release" ]; then - echo "Fetching pre-release..." - LATEST_RELEASE="pre-release" + if [ "$TARGET_BRANCH" == "alpha" ] || [ "$TARGET_BRANCH" == "beta" ]; then + # There is no floating "alpha"/"beta" GitHub Release - gha.ps1 cuts a + # fresh versioned tag every time (v0.4.2-beta.4, v0.4.2-alpha.7, ...). + # /releases/latest only ever returns the newest NON-prerelease + # (stable) tag, so it can't find these. Query the full releases list + # (newest first) and take the first tag_name containing "-$TARGET_BRANCH". + echo "Fetching latest ${TARGET_BRANCH} release..." + LATEST_RELEASE=$(curl -s "https://api.github.com/repos/${GITHUB_REPO}/releases" \ + | grep '"tag_name":' \ + | grep -- "-${TARGET_BRANCH}" \ + | head -1 \ + | sed -E 's/.*"tag_name": *"([^"]+)".*/\1/') else echo "Fetching latest stable release..." LATEST_RELEASE=$(curl -s "https://api.github.com/repos/${GITHUB_REPO}/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')