licence,ci: ship OFL with Plex fonts and guard release dispatch (P5)
test / test (push) Has been cancelled

IBM Plex WOFF2 files were shipped without the SIL OFL 1.1 text, NOTICE
told modifiers to edit layout.html for a Source URL that lives in
legal.go, and workflow_dispatch took GITHUB_REF_NAME as the version so a
run from main would publish ghcr.io/...:main.

Closes P5 of docs/plans/code-review.md. CHANGELOG updated.

Co-Authored-By: Cursor Grok 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-14 09:47:33 +03:00
parent efdc2d63fb
commit 97a0c7e508
15 changed files with 232 additions and 60 deletions
+3 -2
View File
@@ -14,8 +14,9 @@ import (
var License []byte
// SourceURL is where Corresponding Source for the published upstream
// releases lives. Operators who ship a modified version must point their
// users at their own sources instead (NOTICE; AGPL-3.0 §13).
// releases lives. It is injected into the panel footer by view.go.
// Operators who ship a modified version must change this constant so the
// footer points at their own sources (NOTICE; AGPL-3.0 §13).
const SourceURL = "https://github.com/mixeme/selfpost"
// CopyrightLine is the short copyright notice shown in the panel footer.
+19
View File
@@ -19,3 +19,22 @@ func TestEmbeddedLicenseMatchesRoot(t *testing.T) {
t.Fatal("embedded LICENSE is empty")
}
}
// NOTICE used to tell modifiers to edit layout.html for the Source URL. The
// footer reads legal.SourceURL; a fork that only changed the template would
// still advertise the upstream repo.
func TestNoticePointsAtSourceURLConstant(t *testing.T) {
notice, err := os.ReadFile(filepath.Join("..", "..", "NOTICE"))
if err != nil {
t.Fatalf("read NOTICE: %v", err)
}
if !bytes.Contains(notice, []byte("internal/legal/legal.go")) {
t.Error("NOTICE must tell modifiers to update SourceURL in internal/legal/legal.go")
}
if bytes.Contains(notice, []byte("layout.html")) {
t.Error("NOTICE still tells modifiers to edit layout.html for the Source URL")
}
if !bytes.Contains(notice, []byte("internal/web/view/static/OFL.txt")) {
t.Error("NOTICE must point at the OFL text that travels with the Plex fonts")
}
}