From 2c6739ad76e30f15ce0d02ad96b75a86c352bca5 Mon Sep 17 00:00:00 2001 From: Lemon-miaow Date: Wed, 23 Sep 2026 20:58:34 +0800 Subject: [PATCH] fix(updater,install,docs): follow the move to FelisMC/Felis (#53) The repository moved to FelisMC/Felis, but the felis-api release coordinate, the installer's default FELIS_REPO_URL, the PaperMC user-agent strings and both READMEs still named MliroLirrorsIngenuity/Felis. Live on the audit box, 'felis update' reported 'github: MliroLirrorsIngenuity/Felis releases/latest returned HTTP 404 -- ...', pointing operators at a coordinate that no longer exists; the old path keeps answering today only because GitHub still 301s the transfer (verified with a read token against api.github.com: old path 301, new path 200), and if that redirect is ever retired every install and every update check breaks with it. Replace the coordinate in the six tracked files: the updater topology and both test fixtures, the bootstrap default URL and user-agent strings, and README.md/README_EN.md. Green live: the same command now reports 'github: FelisMC/Felis releases/latest returned HTTP 404 -- ...' (still 404 because the new home has published no stable release yet -- a release-process fact, not a code bug). Gates: gofmt, go vet, go test ./..., deploy/bootstrap_test.sh all clean. --- README.md | 4 ++-- README_EN.md | 2 +- deploy/bootstrap.sh | 6 +++--- internal/updater/runner_test.go | 6 +++--- internal/updater/topology.go | 2 +- internal/updater/topology_test.go | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 2fc292c..40bc56e 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ A Kubernetes-driven Minecraft server hosting platform — one command to deploy, 在准备好的 Linux 主机上执行: ```bash -curl -fsSL https://raw.githubusercontent.com/MliroLirrorsIngenuity/Felis/main/deploy/bootstrap.sh | sudo bash +curl -fsSL https://raw.githubusercontent.com/FelisMC/Felis/main/deploy/bootstrap.sh | sudo bash ``` 脚本将自动安装 K3s、部署控制平面并启动设置向导。完成后浏览器访问已配置的域名进入控制面板即可使用。 @@ -41,7 +41,7 @@ curl -fsSL https://raw.githubusercontent.com/MliroLirrorsIngenuity/Felis/main/de > export FELIS_GITHUB_TOKEN=<对本仓库有读权限的 token> > printf 'header = "Authorization: Bearer %s"\n' "$FELIS_GITHUB_TOKEN" \ > | curl -fsSL --config - -H "Accept: application/vnd.github.raw" \ -> https://api.github.com/repos/MliroLirrorsIngenuity/Felis/contents/deploy/bootstrap.sh \ +> https://api.github.com/repos/FelisMC/Felis/contents/deploy/bootstrap.sh \ > | sudo -E bash > ``` > diff --git a/README_EN.md b/README_EN.md index bd731f5..dc42da2 100644 --- a/README_EN.md +++ b/README_EN.md @@ -29,7 +29,7 @@ Table of Contents On a prepared Linux host, run: ```bash -curl -fsSL https://raw.githubusercontent.com/MliroLirrorsIngenuity/Felis/main/deploy/bootstrap.sh | sudo bash +curl -fsSL https://raw.githubusercontent.com/FelisMC/Felis/main/deploy/bootstrap.sh | sudo bash ``` The script installs K3s, deploys the control plane, and launches a setup wizard. Once done, open your browser at the configured domain. diff --git a/deploy/bootstrap.sh b/deploy/bootstrap.sh index 75cbe6e..06cc9a1 100644 --- a/deploy/bootstrap.sh +++ b/deploy/bootstrap.sh @@ -84,7 +84,7 @@ set -Eeuo pipefail # --------------------------------------------------------------------------- # Configuration & constants # --------------------------------------------------------------------------- -FELIS_REPO_URL="${FELIS_REPO_URL:-https://github.com/MliroLirrorsIngenuity/Felis.git}" +FELIS_REPO_URL="${FELIS_REPO_URL:-https://github.com/FelisMC/Felis.git}" # Which version to install. "release" builds the newest published GitHub release; # "dev" builds the tip of main. Release is the default because an installer that # tracks a moving branch by default hands every new host a different, untested @@ -1430,7 +1430,7 @@ resolve_game_jars() { luckperms_latest_jar() { local json url json="$(curl -fsSL --retry 5 --retry-delay 2 \ - -A "felis-bootstrap (+https://github.com/MliroLirrorsIngenuity/Felis)" \ + -A "felis-bootstrap (+https://github.com/FelisMC/Felis)" \ "https://metadata.luckperms.net/data/all")" || return 1 url="$(printf '%s' "$json" \ | grep -o 'https://download\.luckperms\.net/[0-9]\{1,\}/bukkit/loader/[^"]*\.jar' || true)" @@ -1452,7 +1452,7 @@ luckperms_latest_jar() { papermc_latest_jar() { local project="$1" version="$2" json urls url sha json="$(curl -fsSL --retry 5 --retry-delay 2 \ - -A "felis-bootstrap (+https://github.com/MliroLirrorsIngenuity/Felis)" \ + -A "felis-bootstrap (+https://github.com/FelisMC/Felis)" \ "https://fill.papermc.io/v3/projects/${project}/versions/${version}/builds/latest")" || return 1 urls="$(printf '%s' "$json" | grep -o 'https://fill-data\.papermc\.io/[^"]*\.jar' || true)" url="${urls%%$'\n'*}" diff --git a/internal/updater/runner_test.go b/internal/updater/runner_test.go index 0ba54db..1af20a9 100644 --- a/internal/updater/runner_test.go +++ b/internal/updater/runner_test.go @@ -144,9 +144,9 @@ func TestRunnerWithRoutingSource(t *testing.T) { // GitHub fixtures keyed by repo. The handler also mirrors GitHub's real gate: a // UA-less request is refused. ghBodies := map[string]string{ - "/repos/MliroLirrorsIngenuity/Felis/releases/latest": `{"tag_name":"1.5.0","prerelease":false,"draft":false}`, - "/repos/k3s-io/k3s/releases/latest": k3sLatestFixture, - "/repos/cloudflare/cloudflared/releases/latest": cloudflaredLatestFixture, + "/repos/FelisMC/Felis/releases/latest": `{"tag_name":"1.5.0","prerelease":false,"draft":false}`, + "/repos/k3s-io/k3s/releases/latest": k3sLatestFixture, + "/repos/cloudflare/cloudflared/releases/latest": cloudflaredLatestFixture, } ghSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.Header.Get("User-Agent") == "" { diff --git a/internal/updater/topology.go b/internal/updater/topology.go index 4a8cca1..431086b 100644 --- a/internal/updater/topology.go +++ b/internal/updater/topology.go @@ -52,7 +52,7 @@ func Topology() []Spec { // optional token: unauthenticated, this coord answers 404 — the status GitHub uses // to hide a repo's existence — and felis-api is the one tracked component where // that happens. k3s and cloudflared are public and need no credential. - {Name: "felis-api", Policy: updates.PolicyScheduled, Manageable: true, Source: sourceGitHub, Coord: "MliroLirrorsIngenuity/Felis"}, + {Name: "felis-api", Policy: updates.PolicyScheduled, Manageable: true, Source: sourceGitHub, Coord: "FelisMC/Felis"}, {Name: "k3s", Policy: updates.PolicyNotify, Manageable: false, Source: sourceGitHub, Coord: "k3s-io/k3s"}, {Name: "cloudflared", Policy: updates.PolicyScheduled, Manageable: true, Source: sourceGitHub, Coord: "cloudflare/cloudflared"}, {Name: "velocity", Policy: updates.PolicyNotify, Manageable: false, Source: sourcePaperMC, Coord: "velocity"}, diff --git a/internal/updater/topology_test.go b/internal/updater/topology_test.go index b45354c..7c57b69 100644 --- a/internal/updater/topology_test.go +++ b/internal/updater/topology_test.go @@ -11,7 +11,7 @@ import ( // allowed to auto-apply. func TestTopologyEncodesPolicies(t *testing.T) { want := map[string]Spec{ - "felis-api": {Name: "felis-api", Policy: updates.PolicyScheduled, Manageable: true, Source: sourceGitHub, Coord: "MliroLirrorsIngenuity/Felis"}, + "felis-api": {Name: "felis-api", Policy: updates.PolicyScheduled, Manageable: true, Source: sourceGitHub, Coord: "FelisMC/Felis"}, "k3s": {Name: "k3s", Policy: updates.PolicyNotify, Manageable: false, Source: sourceGitHub, Coord: "k3s-io/k3s"}, "cloudflared": {Name: "cloudflared", Policy: updates.PolicyScheduled, Manageable: true, Source: sourceGitHub, Coord: "cloudflare/cloudflared"}, "velocity": {Name: "velocity", Policy: updates.PolicyNotify, Manageable: false, Source: sourcePaperMC, Coord: "velocity"},