chore(release): remove every 'gitea' reference from the public tree (comments, test fake-host, redundant ignore)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>feat/v1-foundation
parent
54518c1f30
commit
176b132da9
|
|
@ -8,7 +8,6 @@
|
|||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
.env.gitea
|
||||
|
||||
# Deps / build output (reinstalled or rebuilt in the image)
|
||||
vendor
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
.env.gitea
|
||||
*.pem
|
||||
|
||||
.phpunit.result.cache
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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')) {
|
||||
|
|
|
|||
|
|
@ -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: <base>/api/v1/repos/<o>/<r>/tags?limit=.
|
||||
* Newest tag from the host's tag API. Self-hosted: <base>/api/v1/repos/<o>/<r>/tags?limit=.
|
||||
* GitHub: https://api.github.com/repos/<o>/<r>/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/<o>/<r>/<ref>/…
|
||||
* Self-hosted: the /raw API with ?ref=. GitHub: https://raw.githubusercontent.com/<o>/<r>/<ref>/…
|
||||
* Cached briefly so a page render never repeats the call. Null on any failure (degrade quietly).
|
||||
*/
|
||||
public function fetchChangelog(string $ref): ?string
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <project-dir> <env-file>
|
||||
set -euo pipefail
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue