From ffba2b980c4865d3ad09e991a0887097f887a87f Mon Sep 17 00:00:00 2001 From: pepaskopec-blip Date: Wed, 23 Sep 2026 21:09:28 +0200 Subject: [PATCH] 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 --- .github/workflows/build.yml | 17 ++-- Makefile | 6 +- README.md | 18 ++-- data/changelog.txt | 8 +- installers/maturita-installer-android.zip | Bin 1031 -> 1031 bytes installers/maturita-installer-ios.zip | Bin 1340 -> 1340 bytes installers/maturita-installer-macos.zip | Bin 3210 -> 3210 bytes scripts/smoke-platforms.sh | 99 ++++++++++++++++++++++ 8 files changed, 130 insertions(+), 18 deletions(-) create mode 100755 scripts/smoke-platforms.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad6e012..4c533d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/Makefile b/Makefile index 7d24bde..be19767 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 27633d4..36bd3b4 100644 --- a/README.md +++ b/README.md @@ -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) ``` diff --git a/data/changelog.txt b/data/changelog.txt index a243ba2..7421200 100644 --- a/data/changelog.txt +++ b/data/changelog.txt @@ -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 diff --git a/installers/maturita-installer-android.zip b/installers/maturita-installer-android.zip index 7c8cfa331f1041ca2a73378eb9524605f613bb64..736f6607cacc76b42a6f7349b2f0ea8818694e96 100644 GIT binary patch delta 45 zcmZqYXy@Pw@MdNaVPIh3V7R$tB9A`XE}1P^yJR*x#xXP9Trznfvn|sunaK~B)d3NS B4ZQ#W delta 45 zcmZqYXy@Pw@MdNaVPIh3V3;*;B9A`XXTdF5p9MEM#xXO^nm2hNvn|tS!O0Jp)d3G1 B4ZQ#W diff --git a/installers/maturita-installer-ios.zip b/installers/maturita-installer-ios.zip index e2947f2b938eb42e6ad9362fa11250f08043a30c..237318eaad9834e0d4b7a44ca157d518cfef556c 100644 GIT binary patch delta 45 zcmV+|0Mh@w3cLyoP)h>@6aWAK2mslnkqkEmx*W7>x*V}dg9HNEq?67BMFP4UlNALg DC(;eh delta 45 zcmV+|0Mh@w3cLyoP)h>@6aWAK2mqR%kqkEm^AWUa^AWL0g9HMao|Dc5MFR5?lNALg DC1efG diff --git a/installers/maturita-installer-macos.zip b/installers/maturita-installer-macos.zip index d376234779134e8d438ef7eecb7a687ad4ce7a65..0b5b80fa884f3932039607dabf9799c1acd3cce7 100644 GIT binary patch delta 225 zcmeB@?2_aO@MdP=VgP}gOD6IdEANuok_E!072FJrEMFNJ7+6Grk|@fOY=}~J(1{IV z+GI{fX{MV?CaW=eLq#^1GxD>8ggQ9fU_w_o>KQ>op)7e({{ delta 225 zcmeB@?2_aO@MdP=VgP|z^Ct2bD}NT;k_E!072FJrEMFNJ7+6Grk|@fOY=}~J(1{IV z+GI{fX{K58CaW=eLq#^1GxD>8ggQ9fU_w_o>KQ>op %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"