chore(migration): repoint every published link off GitHub
The canonical repo is git.zacharyzhang.com now, so every URL a user can actually reach had to move with it. Self-updater: `PRODUCTION_ENDPOINTS.update_base_url` targets Gitea's `/api/v1/repos/.../releases`, which serves the same wire format GitHub's releases API did — `Release`/asset deserialisation is unchanged. The alpha channel requests `?per_page=30&limit=30` because GitHub reads the page size from `per_page` and Gitea from `limit`, and each ignores the other's, so one URL stays correct on either. Installers: same API base, and the documented one-liners become `https://kigicli.dev/install.{sh,ps1}`. That domain's Worker proxies both files from Gitea raw `main`, so the published install command survives any future forge move without being reprinted everywhere. install.ps1 also drops the GitHub-specific `Accept: application/vnd.github+json`. Everything else user-facing: `/feedback` and the shell's feedback fallback point at the Gitea issue tracker, `/docs` at the Gitea-rendered README, and web_fetch's User-Agent at kigicli.dev. SECURITY.md now routes reports to the issue tracker with a warning to withhold exploitable detail, because Gitea has no equivalent of GitHub's private vulnerability reporting. Comments naming `.github/workflows/release.yml` name `.gitea/` now. Tests assert against these constants rather than literal URLs, so they follow automatically; the one URL-shape assertion (production endpoints are https) still holds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
8bdfb551b6
commit
9fb82291b2
12 files changed
+68
-56
No files matched your search
+9
-8
@@ -1,17 +1,17 @@
|
||||
# Kigi installer (Windows x86_64) — PRD F8.
|
||||
#
|
||||
# Downloads the x86_64-pc-windows-msvc artifact from this repo's GitHub
|
||||
# Releases, verifies its SHA-256 against the release's SHA256SUMS manifest,
|
||||
# and installs the binary as %USERPROFILE%\.kigi\bin\kigi.exe.
|
||||
# Downloads the x86_64-pc-windows-msvc artifact from this repo's Releases,
|
||||
# verifies its SHA-256 against the release's SHA256SUMS manifest, and
|
||||
# installs the binary as %USERPROFILE%\.kigi\bin\kigi.exe.
|
||||
#
|
||||
# Usage:
|
||||
# irm https://raw.githubusercontent.com/ZacharyZhang-NY/Kigi-CLI/main/install.ps1 | iex
|
||||
# irm https://kigicli.dev/install.ps1 | iex
|
||||
# powershell -ExecutionPolicy Bypass -File install.ps1 -Version v0.1.0
|
||||
#
|
||||
# Environment:
|
||||
# KIGI_SHARE_DIR install root (default: %USERPROFILE%\.kigi)
|
||||
# KIGI_UPDATE_BASE_URL GitHub-Releases-shaped API base (default:
|
||||
# https://api.github.com/repos/ZacharyZhang-NY/Kigi-CLI/releases)
|
||||
# KIGI_UPDATE_BASE_URL releases API base, GitHub/Gitea-shaped (default:
|
||||
# https://git.zacharyzhang.com/api/v1/repos/ZacharyZhang-NY/Kigi-CLI/releases)
|
||||
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
@@ -27,7 +27,8 @@ function Fail([string]$Message) {
|
||||
}
|
||||
|
||||
$Repo = "ZacharyZhang-NY/Kigi-CLI"
|
||||
$ApiBase = if ($env:KIGI_UPDATE_BASE_URL) { $env:KIGI_UPDATE_BASE_URL } else { "https://api.github.com/repos/$Repo/releases" }
|
||||
$Forge = "https://git.zacharyzhang.com"
|
||||
$ApiBase = if ($env:KIGI_UPDATE_BASE_URL) { $env:KIGI_UPDATE_BASE_URL } else { "$Forge/api/v1/repos/$Repo/releases" }
|
||||
$KigiHome = if ($env:KIGI_SHARE_DIR) { $env:KIGI_SHARE_DIR } else { Join-Path $env:USERPROFILE ".kigi" }
|
||||
$Triple = "x86_64-pc-windows-msvc"
|
||||
|
||||
@@ -49,7 +50,7 @@ if ($Version -and $Version -notmatch '^\d+\.\d+\.\d+([-.][0-9A-Za-z.-]+)?$') {
|
||||
# TLS 1.2 for older PowerShell 5.1 defaults.
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
$Headers = @{ "User-Agent" = "kigi-install"; "Accept" = "application/vnd.github+json" }
|
||||
$Headers = @{ "User-Agent" = "kigi-install"; "Accept" = "application/json" }
|
||||
|
||||
# ── Resolve the release ──────────────────────────────────────────────────────
|
||||
$ReleaseUrl = if ($Version) { "$ApiBase/tags/v$Version" } else { "$ApiBase/latest" }
|
||||
|
||||
Reference in new issue
Block a user