diff --git a/.dockerignore b/.dockerignore index c22f574..a73c39a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,7 +8,6 @@ .env .env.* !.env.example -.env.gitea # Deps / build output (reinstalled or rebuilt in the image) vendor diff --git a/.gitignore b/.gitignore index ad024a5..23d2c32 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ .env .env.* !.env.example -.env.gitea *.pem .phpunit.result.cache diff --git a/CHANGELOG.md b/CHANGELOG.md index 55964c4..3c62b05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -72,7 +72,7 @@ _Keine offenen Änderungen — der nächste Stand wird hier gesammelt und als `v ### Hinzugefügt - **Update-Check unterstützt jetzt GitHub.** Public-Nutzer sehen Updates aus dem öffentlichen - GitHub-Repo (Tags + Changelog); Dev/Staging laufen weiter über Gitea. + GitHub-Repo (Tags + Changelog); interne Dev/Staging-Stufen bleiben privat. ### Geändert - **Öffentliche Projekt-Adresse ist jetzt `github.com/clusev/clusev`.** README, Quelltext- und diff --git a/app/Livewire/Versions/Index.php b/app/Livewire/Versions/Index.php index f645968..557ccf7 100644 --- a/app/Livewire/Versions/Index.php +++ b/app/Livewire/Versions/Index.php @@ -569,7 +569,7 @@ class Index extends Component /** * Links shown on the "Projekt" card. EVERY install lists the public open-core repo. The * dev/release-control box ALSO lists its actual update source first (which may be the private - * Gitea) — staging and stable never do, so a non-dev server can never expose a private source + * upstream) — staging and stable never do, so a non-dev server can never expose a private source * regardless of how its CLUSEV_REPOSITORY is set. (The update SOURCE is still * config('clusev.repository'); this only governs the displayed links.) * @@ -589,7 +589,7 @@ class Index extends Component } $urls = ['https://github.com/'.$slug]; - // Dev box only: ALSO surface the actual update source (e.g. the private Gitea), shown first. + // Dev box only: ALSO surface the actual update source (e.g. the private upstream), shown first. // Require a real URL (a parseable host) so a misconfigured/garbage source is dropped rather // than rendered as an empty link — the public repo still shows. if (config('clusev.release_controls')) { diff --git a/app/Services/ReleaseChecker.php b/app/Services/ReleaseChecker.php index 2bd58f5..01d464d 100644 --- a/app/Services/ReleaseChecker.php +++ b/app/Services/ReleaseChecker.php @@ -97,14 +97,14 @@ class ReleaseChecker return [$m[1], $m[2], $m[3]]; // base, owner, name } - /** Is the configured host GitHub? GitHub's API + raw host differ from a self-hosted Gitea. */ + /** Is the configured host GitHub? GitHub's API + raw host differ from a self-hosted git host. */ private function isGithubHost(string $base): bool { return (bool) preg_match('#^https?://(www\.)?github\.com/?$#i', $base); } /** - * Newest tag from the host's tag API. Gitea: /api/v1/repos///tags?limit=. + * Newest tag from the host's tag API. Self-hosted: /api/v1/repos///tags?limit=. * GitHub: https://api.github.com/repos///tags?per_page= (a User-Agent is mandatory there). * Returns the version WITHOUT the leading "v" (e.g. "0.9.50"); null on any failure. */ @@ -145,7 +145,7 @@ class ReleaseChecker /** * Fetch CHANGELOG.md at a ref (tag) from the configured host, for the "what's new" preview. - * Gitea: the /raw API with ?ref=. GitHub: https://raw.githubusercontent.com////… + * Self-hosted: the /raw API with ?ref=. GitHub: https://raw.githubusercontent.com////… * Cached briefly so a page render never repeats the call. Null on any failure (degrade quietly). */ public function fetchChangelog(string $ref): ?string diff --git a/config/clusev.php b/config/clusev.php index 37fb1e1..142f763 100644 --- a/config/clusev.php +++ b/config/clusev.php @@ -25,8 +25,8 @@ return [ 'docs_url' => env('CLUSEV_DOCS_URL', 'https://docs.clusev.com'), // Update source. Defaults to the PUBLIC repo (safe to ship — it is public). install.sh overrides - // it via CLUSEV_REPOSITORY, derived from the clone origin: dev points at Gitea, staging at the - // GitHub-private mirror, public users at the public repo. Private (Gitea/GitHub-private) URLs live + // it via CLUSEV_REPOSITORY, derived from the clone origin: dev points at the private upstream, + // staging at the private mirror, public users at the public repo. Private (upstream/mirror) URLs live // ONLY in the gitignored .env — never in tracked files, so the public repo exposes no private URL. 'repository' => env('CLUSEV_REPOSITORY', 'https://github.com/clusev/clusev'), diff --git a/scripts/set-repository-url.sh b/scripts/set-repository-url.sh index 31a7ba1..e6e176d 100755 --- a/scripts/set-repository-url.sh +++ b/scripts/set-repository-url.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Derive the update source (CLUSEV_REPOSITORY) from the clone origin and write it into the given .env. -# Called by install.sh + update.sh. The private (Gitea/GitHub-private) URL therefore lives ONLY in the +# Called by install.sh + update.sh. The private (upstream/mirror) URL therefore lives ONLY in the # gitignored .env — never in a tracked file. No-op (exit 0) when there is no origin remote. # usage: set-repository-url.sh set -euo pipefail diff --git a/scripts/set-repository-url.test.sh b/scripts/set-repository-url.test.sh index 755ec00..fb913cd 100755 --- a/scripts/set-repository-url.test.sh +++ b/scripts/set-repository-url.test.sh @@ -14,10 +14,10 @@ grep -qx 'CLUSEV_REPOSITORY=https://git.example.com/o/clusev' "$work/proj/.env" # replace an existing line printf 'CLUSEV_REPOSITORY=old\n' >> "$work/proj/.env" -git -C "$work/proj" remote set-url origin https://gitea.local/u/clusev +git -C "$work/proj" remote set-url origin https://selfhosted.local/u/clusev bash "$here/set-repository-url.sh" "$work/proj" "$work/proj/.env" test "$(grep -c '^CLUSEV_REPOSITORY=' "$work/proj/.env")" = 1 || { echo "FAIL: duplicate line"; exit 1; } -grep -qx 'CLUSEV_REPOSITORY=https://gitea.local/u/clusev' "$work/proj/.env" || { echo "FAIL: replace"; exit 1; } +grep -qx 'CLUSEV_REPOSITORY=https://selfhosted.local/u/clusev' "$work/proj/.env" || { echo "FAIL: replace"; exit 1; } # no origin → no-op, no crash git init -q "$work/noremote"; printf '' > "$work/noremote/.env" diff --git a/tests/Feature/ReleaseCheckerTest.php b/tests/Feature/ReleaseCheckerTest.php index 9707da1..e5a7196 100644 --- a/tests/Feature/ReleaseCheckerTest.php +++ b/tests/Feature/ReleaseCheckerTest.php @@ -17,11 +17,11 @@ class ReleaseCheckerTest extends TestCase { use RefreshDatabase; - // Neutral Gitea-style host so the suite is hermetic (never depends on the ambient .env) and + // Neutral self-hosted host so the suite is hermetic (never depends on the ambient .env) and // leaks no real repository URL into the published tests. GitHub-host coverage sets its own URL. - private const REPO = 'https://gitea.test/o/clusev'; + private const REPO = 'https://selfhosted.test/o/clusev'; - private const TAGS_URL = 'gitea.test/api/v1/repos/o/clusev/tags*'; + private const TAGS_URL = 'selfhosted.test/api/v1/repos/o/clusev/tags*'; protected function setUp(): void { diff --git a/tests/Feature/UpdateProgressTest.php b/tests/Feature/UpdateProgressTest.php index 7819e9c..4f71332 100644 --- a/tests/Feature/UpdateProgressTest.php +++ b/tests/Feature/UpdateProgressTest.php @@ -23,9 +23,9 @@ class UpdateProgressTest extends TestCase { use RefreshDatabase; - private const REPO = 'https://gitea.test/o/clusev'; + private const REPO = 'https://selfhosted.test/o/clusev'; - private const TAGS_URL = 'gitea.test/api/v1/repos/o/clusev/tags*'; + private const TAGS_URL = 'selfhosted.test/api/v1/repos/o/clusev/tags*'; protected function setUp(): void { diff --git a/tests/Feature/VersionUpdateCheckTest.php b/tests/Feature/VersionUpdateCheckTest.php index 9e65198..2a19d04 100644 --- a/tests/Feature/VersionUpdateCheckTest.php +++ b/tests/Feature/VersionUpdateCheckTest.php @@ -24,11 +24,11 @@ class VersionUpdateCheckTest extends TestCase { use RefreshDatabase; - // Neutral Gitea-style host so the suite is hermetic (independent of the ambient .env) and the + // Neutral self-hosted host so the suite is hermetic (independent of the ambient .env) and the // published tests carry no real repository URL. - private const REPO = 'https://gitea.test/o/clusev'; + private const REPO = 'https://selfhosted.test/o/clusev'; - private const TAGS_URL = 'gitea.test/api/v1/repos/o/clusev/tags*'; + private const TAGS_URL = 'selfhosted.test/api/v1/repos/o/clusev/tags*'; protected function setUp(): void { @@ -69,7 +69,7 @@ class VersionUpdateCheckTest extends TestCase config()->set('clusev.version', '0.9.4'); Http::fake([ self::TAGS_URL => Http::response([['name' => 'v0.9.6'], ['name' => 'v0.9.5'], ['name' => 'v0.9.4']]), - 'gitea.test/api/v1/repos/o/clusev/raw/CHANGELOG.md*' => Http::response( + 'selfhosted.test/api/v1/repos/o/clusev/raw/CHANGELOG.md*' => Http::response( "# Changelog\n\n## [0.9.6] - 2026-06-22\n\n### Hinzugefügt\n- Brandneues Feature XYZ.\n\n". "## [0.9.5] - 2026-06-22\n\n### Behoben\n- Fehler ABC behoben.\n\n". "## [0.9.4] - 2026-06-21\n\n### Geändert\n- Schon installiert.\n" @@ -320,7 +320,7 @@ class VersionUpdateCheckTest extends TestCase config()->set('clusev.public_slug', 'clusev/clusev'); Http::fake(); - // setUp() set clusev.repository to the (Gitea-style) source — the dev box lists it FIRST, + // setUp() set clusev.repository to the (self-hosted) source — the dev box lists it FIRST, // then the public repo. Both visible. Livewire::test(Index::class)->assertViewHas('repositories', fn ($repos) => self::urls($repos) === [ self::REPO, 'https://github.com/clusev/clusev', @@ -346,7 +346,7 @@ class VersionUpdateCheckTest extends TestCase config()->set('clusev.public_slug', 'clusev/clusev'); Http::fake(); - // Even though clusev.repository points at the private Gitea source (setUp), the card lists + // Even though clusev.repository points at the private self-hosted source (setUp), the card lists // ONLY the public repo — a non-dev server never exposes the private source. Livewire::test(Index::class)->assertViewHas('repositories', fn ($repos) => self::urls($repos) === [ 'https://github.com/clusev/clusev', @@ -385,7 +385,7 @@ class VersionUpdateCheckTest extends TestCase return [ 'empty' => ['', 'https://github.com/clusev/clusev'], 'surrounding slashes' => ['/acme/pub/', 'https://github.com/acme/pub'], - 'full private url' => ['https://gitea.internal/o/repo', 'https://github.com/clusev/clusev'], + 'full private url' => ['https://selfhosted.internal/o/repo', 'https://github.com/clusev/clusev'], ]; } }