feat(update): felis update 报告 JRE 与 PostgreSQL(含停更提示),bootstrap 支持 FELIS_UPGRADE_DEPS=1 升级 k3s/cloudflared

This commit is contained in:
Lemon-miaow committed 2026-09-25 01:35:52 +08:00
1 parent 6f7b8d7b30
commit b1678f78c8
19 files changed
+790 -78

No files matched your search

+23
View File
@@ -17,8 +17,31 @@ import (
const (
cloudflaredLatestFixture = `{"tag_name":"2026.6.1","prerelease":false,"draft":false,"name":"2026.6.1"}`
k3sLatestFixture = `{"tag_name":"v1.36.2+k3s1","prerelease":false,"draft":false,"name":"v1.36.2+k3s1"}`
// adoptium/temurin25-binaries on 2026-09-25: an emergency respin, four components.
temurinLatestFixture = `{"tag_name":"jdk-25.0.4.1+1","prerelease":false,"draft":false,"name":"jdk-25.0.4.1+1"}`
)
// TestGitHubLatestTemurin reads the feature line's repository and drops the "jdk-"
// prefix Adoptium tags every build with.
func TestGitHubLatestTemurin(t *testing.T) {
var path string
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
path = r.URL.Path
_, _ = w.Write([]byte(temurinLatestFixture))
}))
defer srv.Close()
v, err := newTestGitHub(srv).latestTemurin(context.Background(), 25)
if err != nil {
t.Fatalf("latestTemurin: %v", err)
}
if path != "/repos/adoptium/temurin25-binaries/releases/latest" {
t.Errorf("requested %s, want the temurin25-binaries repository", path)
}
if v.String() != "25.0.4.1+1" || v.Revision != 1 {
t.Errorf("version = %s (%+v), want 25.0.4.1+1 with revision 1", v, v)
}
}
func newTestGitHub(srv *httptest.Server) github {
return github{
baseURL: srv.URL,