From 4e85ff3e45659970d48ce69dd1ce132ae746b72b Mon Sep 17 00:00:00 2001 From: FoggyMtnDrifter Date: Sun, 22 Nov 2026 10:30:20 -0500 Subject: [PATCH] Use dotted numeric versions for date-released apps (#8) The platform only accepts versions made of numbers and dots followed by -c, and compares them to decide automatic updates. DokuWiki, RSS-Bridge, RSSHub and Tiny Tiny RSS used their date tags with hyphens (and DokuWiki a hotfix letter), so the platform rejected them. A new CI job checks every recipe's version, and the README explains how to write date releases. --- .github/workflows/validate.yml | 20 ++++++++++++++++++++ README.md | 2 +- apps/dokuwiki/template.yml | 2 +- apps/rss-bridge/template.yml | 2 +- apps/rsshub/template.yml | 2 +- apps/tt-rss/template.yml | 2 +- 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index b6eff4d..8b9982e 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -8,6 +8,26 @@ jobs: # The same test contributors run locally: each recipe with Docker Compose, until its health # path answers 200. Pull requests and pushes test the recipes they change; a manual run tests # all of them. Runs on every pull request, forks included. + # Versions must be numbers separated by dots, then -c (e.g. 1.34.3-c1): the + # platform rejects anything else and compares them to decide automatic updates. + versions: + name: Version format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check every recipe's version + run: | + python3 - <<'PY' + import glob, re, sys, yaml + bad = [] + for p in sorted(glob.glob("apps/*/template.yml")): + v = str((yaml.safe_load(open(p)).get("x-harbor") or {}).get("version", "")) + if not re.fullmatch(r"[0-9]+(\.[0-9]+)*-c[1-9][0-9]*", v): + bad.append(f"{p}: version {v!r} must look like 1.34.3-c1 (numbers and dots, then -c)") + print("\n".join(bad) or "all versions OK") + sys.exit(1 if bad else 0) + PY + compose: name: Docker Compose test runs-on: ubuntu-latest diff --git a/README.md b/README.md index 6257c77..c907f96 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Cottage how to run it: | Key | Meaning | | --- | --- | | `slug`, `name`, `description` | `slug` matches the directory name and the upstream project, lowercase with hyphens | -| `version` | `-c`, e.g. `1.34.3-c1` | +| `version` | `-c`, e.g. `1.34.3-c1`. The upstream part is numbers separated by dots, so automatic updates can compare versions: write a date release `2026-11-21` as `2026.11.21`, and a hotfix letter as a fourth number (`2026-07-14c` → `2026.07.14.3`). | | `primary` | the service and port that serve the app over HTTPS, e.g. `{ service: app, port: 8080 }` | | `health_path` | a path that answers 200 once the app is ready | | `default_resources`, `min_resources` | `cpu_millis`, `memory_mb`, `storage_mb` | diff --git a/apps/dokuwiki/template.yml b/apps/dokuwiki/template.yml index 7ff0f70..7f16a37 100644 --- a/apps/dokuwiki/template.yml +++ b/apps/dokuwiki/template.yml @@ -3,7 +3,7 @@ x-harbor: slug: dokuwiki name: DokuWiki description: Simple wiki that stores pages as plain text files. - version: "2026-07-14c-c1" + version: "2026.07.14.3-c1" # upstream 2026-07-14c; the hotfix letter is the 4th number (a=1, b=2, c=3) primary: { service: app, port: 8080 } health_path: /health.php default_resources: { cpu_millis: 250, memory_mb: 256, storage_mb: 5120 } diff --git a/apps/rss-bridge/template.yml b/apps/rss-bridge/template.yml index d9a4c55..2e4e5ad 100644 --- a/apps/rss-bridge/template.yml +++ b/apps/rss-bridge/template.yml @@ -3,7 +3,7 @@ x-harbor: slug: rss-bridge name: RSS-Bridge description: Generates feeds for websites that don't have one. - version: "2025-08-05-c1" + version: "2025.08.05-c1" # upstream 2025-08-05 primary: { service: app, port: 8080 } health_path: /?action=health default_resources: { cpu_millis: 500, memory_mb: 256, storage_mb: 5120 } diff --git a/apps/rsshub/template.yml b/apps/rsshub/template.yml index 93b3bb4..3f3b11d 100644 --- a/apps/rsshub/template.yml +++ b/apps/rsshub/template.yml @@ -3,7 +3,7 @@ x-harbor: slug: rsshub name: RSSHub description: Open-source RSS feed generator for thousands of sites. - version: "2026-11-21-c1" + version: "2026.11.21-c1" # upstream 2026-11-21 primary: { service: app, port: 1200 } health_path: / default_resources: { cpu_millis: 500, memory_mb: 512, storage_mb: 5120 } diff --git a/apps/tt-rss/template.yml b/apps/tt-rss/template.yml index 8177946..8a742dd 100644 --- a/apps/tt-rss/template.yml +++ b/apps/tt-rss/template.yml @@ -6,7 +6,7 @@ x-harbor: slug: tt-rss name: Tiny Tiny RSS description: Web-based news feed reader and aggregator. - version: "20261121-201339-c1" + version: "20261121.201339-c1" # upstream 20261121-201339 primary: { service: web, port: 8080 } health_path: /healthz default_resources: { cpu_millis: 500, memory_mb: 1024, storage_mb: 5120 }