Fix Forgejo mirror path and document the full reading-list release.

Point the CI mirror at edu/, force-push both branches, refresh README/changelog, and add make smoke for installer and builds checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pepaskopec-blip 2026-09-23 21:09:28 +02:00
commit ffba2b980c
8 changed files with 130 additions and 18 deletions

View file

@ -263,6 +263,7 @@ jobs:
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
FORGEJO_USER: ${{ secrets.FORGEJO_USER }}
FORGEJO_URL: ${{ secrets.FORGEJO_URL }}
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
@ -281,16 +282,16 @@ jobs:
echo "No FORGEJO_TOKEN; skipping Forgejo builds publish."
exit 0
fi
# Trim and fall back: an empty FORGEJO_USER secret is still "set", so
# ${VAR:-oauth2} would keep "" and produce https://:token@host which
# libcurl rejects as "Bad hostname". Prefer Basic auth over URL userinfo
# so tokens with @/: never break the URL either.
# Prefer Basic auth over URL userinfo so tokens with @/: never
# break the URL. Force-push: this is a one-way GitHub → Forgejo
# mirror (repo moved to edu/; non-ff rejects otherwise).
token="$(printf '%s' "$FORGEJO_TOKEN" | tr -d '\r\n')"
user="$(printf '%s' "${FORGEJO_USER:-}" | tr -d '\r\n')"
user="${user:-oauth2}"
basic="$(printf '%s:%s' "$user" "$token" | base64 -w0)"
forgejo_url="${FORGEJO_URL:-https://git.dvorakmortonxd.dev/edu/maturita.c.git}"
git -c "http.extraHeader=Authorization: Basic ${basic}" push -f \
"https://git.dvorakmortonxd.dev/skopcaak/maturita.c.git" \
"$forgejo_url" \
HEAD:refs/heads/builds
forgejo-main:
@ -304,6 +305,7 @@ jobs:
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
FORGEJO_USER: ${{ secrets.FORGEJO_USER }}
FORGEJO_URL: ${{ secrets.FORGEJO_URL }}
run: |
set -euo pipefail
token="$(printf '%s' "${FORGEJO_TOKEN:-}" | tr -d '\r\n')"
@ -314,6 +316,7 @@ jobs:
user="$(printf '%s' "${FORGEJO_USER:-}" | tr -d '\r\n')"
user="${user:-oauth2}"
basic="$(printf '%s:%s' "$user" "$token" | base64 -w0)"
git -c "http.extraHeader=Authorization: Basic ${basic}" push \
"https://git.dvorakmortonxd.dev/skopcaak/maturita.c.git" \
forgejo_url="${FORGEJO_URL:-https://git.dvorakmortonxd.dev/edu/maturita.c.git}"
git -c "http.extraHeader=Authorization: Basic ${basic}" push -f \
"$forgejo_url" \
HEAD:refs/heads/main

View file

@ -114,6 +114,10 @@ installer-zips:
chmod +x installers/pack-installer-zips.sh
./installers/pack-installer-zips.sh
smoke:
chmod +x scripts/smoke-platforms.sh
./scripts/smoke-platforms.sh
-include $(DEP)
android:
@ -128,4 +132,4 @@ macos:
chmod +x scripts/bundle-macos-swift.sh
./scripts/bundle-macos-swift.sh
.PHONY: all clean run bundle installer-zips android ios macos
.PHONY: all clean run bundle installer-zips smoke android ios macos

View file

@ -67,7 +67,7 @@ Intel Mac, jiná architektura nebo úpravy kódu → [sestavení ze zdroje](#ses
ročníky 2–4 jsou zamčené
- **Technické vybavení** — 3 lekce (architektura, historie, bit/byte)
- **Český jazyk a literatura** — mluvnice (20 cvičení) a maturitní četba
(1984, Spalovač mrtvol); literatura je zatím zamčená
(82 knih: zápisky, kvíz, sestavení děje); literární teorie je zatím zamčená
- statistiky, hledání (lupa nebo `Cmd/Ctrl+K`), 10 témat, tmavý/světlý režim, čeština/angličtina
- ukončení: `Cmd/Super+Q` nebo `Alt+F4`
@ -115,6 +115,7 @@ Na Linuxu a Windows:
make
make run # nebo ./maturita
make bundle # AppImage / Windows složka s DLL
make smoke # instalátory, content packs, dostupnost builds
```
Volitelně CMake (GTK): `cmake -S . -B build && cmake --build build`.
@ -156,11 +157,11 @@ src/ C zdroje (GTK přehrávač pro Linux a Windows)
android/ Jetpack Compose přehrávač (stejný obsah)
ios/ SwiftUI přehrávač (stejný obsah)
macos/ nativní SwiftUI aplikace pro Mac (stejný obsah)
data/ style.css, share/, podpisy, Windows .rc
data/ style.css, changelog.txt, share/, cetba/*.json
assets/ zdrojová ikona a screenshoty
installers/ instalátory, které stáhnou aktuální build
scripts/ balení AppImage, .app, IPA a extract-android-content.py
.github/workflows/ CI: push na main → větev builds
scripts/ balení AppImage, .app, IPA, extract a smoke test
.github/workflows/ CI: push na main → větev builds (+ zrcadlo Forgejo)
progress/ vzniká za běhu (cvičení, nastavení)
```
@ -260,7 +261,7 @@ Intel Mac, another architecture, or hacking on the code →
years 2–4 are locked
- **Computer hardware** — 3 lessons (architecture, history, bit/byte)
- **Czech language** — grammar (20 exercises) and required reading
(1984, Spalovač mrtvol); literature theory is still locked
(82 books: notes, quiz, plot ordering); literature theory is still locked
- statistics, search (magnifier or `Cmd/Ctrl+K`), 10 palettes, dark/light mode, Czech/English
- quit with `Cmd/Super+Q` or `Alt+F4`
@ -308,6 +309,7 @@ On Linux and Windows:
make
make run # or ./maturita
make bundle # AppImage / Windows DLL folder
make smoke # installers, content packs, builds availability
```
Optional CMake (GTK): `cmake -S . -B build && cmake --build build`.
@ -349,11 +351,11 @@ src/ C sources (GTK player for Linux and Windows)
android/ Jetpack Compose player (same content)
ios/ SwiftUI player (same content)
macos/ native SwiftUI Mac app (same content)
data/ style.css, share/, signing files, Windows .rc
data/ style.css, changelog.txt, share/, cetba/*.json
assets/ source icon and screenshots
installers/ fetch-the-latest installers
scripts/ AppImage / .app / IPA bundlers and extract-android-content.py
.github/workflows/ CI: push to main → builds branch
scripts/ AppImage / .app / IPA bundlers, extract, smoke test
.github/workflows/ CI: push to main → builds branch (+ Forgejo mirror)
progress/ created at runtime (exercises, settings)
```

View file

@ -9,14 +9,18 @@
--- 2026-09-23
cs: Aplikace se jmenuje Graduately; úvod stále říká „Maturita? To dáme.“
cs: Kompletní maturitní četba (82 knih) se zápisky, kvízem a sestavením děje
cs: Přehlednější studium knih: nejdřív zápisky, pak procvičení
cs: Studium knih: nejdřív procvičení (kvíz / sestavte děj), pak zápisky
cs: Kvíz a sestavení děje u všech knih i na GTK (Linux / Windows)
cs: Větší a čitelnější rozhraní na Macu
cs: Opravy výběru slov v dialogu a otevření knihy z vyhledávání
cs: Oprava zrcadlení na Forgejo (nová cesta edu/, force-push zrcadla)
en: The app is now Graduately; the welcome line still says “Maturita? We've got this.”
en: Full maturita reading list (82 books) with notes, quiz, and plot ordering
en: Clearer book study flow: notes first, then practice
en: Book study flow: practice first (quiz / order the plot), then notes
en: Quiz and plot assembly for every book on GTK too (Linux / Windows)
en: Larger, more readable Mac interface
en: Fixes for dialogue word picking and opening a book from search
en: Forgejo mirror fix (edu/ path, force-push mirror)
--- 2026-09-18
cs: Po aktualizaci se na hlavní stránce ukáže, co je nového

99
scripts/smoke-platforms.sh Executable file
View file

@ -0,0 +1,99 @@
#!/usr/bin/env bash
# Local smoke checks for installers, content packs, and published builds.
# Does not replace CI; catches packaging / content regressions early.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
REPO="${REPO:-pepaskopec-blip/maturita.c}"
fail=0
say() { printf '==> %s\n' "$*"; }
ok() { printf ' ok: %s\n' "$*"; }
bad() { printf ' FAIL: %s\n' "$*" >&2; fail=1; }
say "Rebuild installer zips"
chmod +x installers/pack-installer-zips.sh
./installers/pack-installer-zips.sh
ok "installer zips refreshed"
say "Installer zip contents"
expect_zip() {
local zip=$1 want=$2
if unzip -Z1 "$zip" | grep -qxF "$want"; then
ok "$zip → $want"
else
bad "$zip missing $want (has: $(unzip -Z1 "$zip" | tr '\n' ' '))"
fi
}
expect_zip installers/maturita-installer-macos.zip "Nainstalovat Graduately.app/Contents/MacOS/installer"
expect_zip installers/maturita-installer-linux.zip "maturita-installer-linux.sh"
expect_zip installers/maturita-installer-windows.zip "maturita-installer-windows.cmd"
expect_zip installers/maturita-installer-android.zip "Stahnout Graduately.html"
expect_zip installers/maturita-installer-ios.zip "Jak nainstalovat Graduately.html"
say "Extract content.json"
tmp=$(mktemp)
python3 scripts/extract-android-content.py --out "$tmp" >/dev/null
python3 - "$tmp" <<'PY'
import json, sys
path = sys.argv[1]
d = json.load(open(path, encoding="utf-8"))
books = d.get("books") or []
assert len(books) == 82, f"expected 82 books, got {len(books)}"
for b in books:
bid = b.get("id")
assert b.get("quiz"), f"{bid}: empty quiz"
assert b.get("plot"), f"{bid}: empty plot"
assert b.get("notes"), f"{bid}: empty notes"
assert b.get("quizTitle"), f"{bid}: missing quizTitle"
assert b.get("plotTitle"), f"{bid}: missing plotTitle"
assert d.get("changelog"), "changelog missing from content.json"
print(f"books={len(books)} changelog={len(d['changelog'])}")
PY
ok "content packs"
rm -f "$tmp"
say "GTK binary"
if [[ -x ./maturita ]]; then
./maturita --help >/dev/null
ok "maturita --help"
else
say "Building GTK binary"
make -j"$(sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo 2)"
./maturita --help >/dev/null
ok "maturita --help after make"
fi
say "Published builds tip"
sha=$(curl -fsSL --max-time 20 \
"https://github.com/$REPO/commits/builds.atom" |
sed -n 's/.*Commit\/\([0-9a-f]\{40\}\).*/\1/p' |
head -n 1)
if [[ ${#sha} -eq 40 ]]; then
ok "builds tip ${sha:0:7}"
for asset in \
maturita-macos-arm64.zip \
maturita-windows-x64.zip \
maturita-linux-x86_64.AppImage \
maturita-android.apk \
maturita-ios.ipa \
VERSION
do
code=$(curl -sI -o /dev/null -w '%{http_code}' --max-time 30 \
"https://raw.githubusercontent.com/$REPO/$sha/$asset")
if [[ "$code" == "200" ]]; then
ok "$asset ($code)"
else
bad "$asset HTTP $code"
fi
done
else
bad "could not resolve builds tip SHA"
fi
if [[ "$fail" -ne 0 ]]; then
echo "smoke failed" >&2
exit 1
fi
echo "smoke passed"