diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ce02a7..364d36d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ versions follow [Semantic Versioning](https://semver.org/). ## [Unreleased] +## [1.4.1] - 2026-10-28 + +### Changed + +- **Release notes are read from the default branch** (`main`), not from the newest tag. Notes still + only show for tagged versions, so a section written ahead of a release stays hidden until it's + tagged — and notes for versions already out can be added or corrected without a new release. + ## [1.4.0] - 2026-10-28 ### Added diff --git a/README.md b/README.md index 5fbaadf..bbfaad6 100644 --- a/README.md +++ b/README.md @@ -42,8 +42,8 @@ and `HUB_PUBLIC_KEY` (the public key shown in Hub → Settings) in Cross Events' ## Releases and notices - **Releases** come from git: every `v1.2.3` tag of `joshua/hope-events` is a release, the newest is - the latest version, and the notes churches see come from `WHATS-NEW.md` in that repo as of the - newest tag. The Hub checks every 15 minutes (and on **Sync now**, Releases page). So releasing + the latest version, and the notes churches see come from `WHATS-NEW.md` on that repo's default branch (only for + tagged versions, so notes can be written ahead or corrected later). The Hub checks every 15 minutes (and on **Sync now**, Releases page). So releasing Cross Events is: write the version's section in `WHATS-NEW.md`, tag, push — installs see the update with their next heartbeat. - **Notices** (Notices page) are banners on churches' sites for their admins and supervisors, emails diff --git a/backend/package-lock.json b/backend/package-lock.json index 20d3243..0607c01 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -1,12 +1,12 @@ { "name": "events-hub-backend", - "version": "1.4.0", + "version": "1.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "events-hub-backend", - "version": "1.4.0", + "version": "1.4.1", "hasInstallScript": true, "dependencies": { "@prisma/adapter-pg": "^7.10.1", diff --git a/backend/package.json b/backend/package.json index b309b76..841a48f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "events-hub-backend", - "version": "1.4.0", + "version": "1.4.1", "private": true, "description": "Cross Events Hub — API for managing Cross Events installs, licences and heartbeats", "main": "src/index.js", diff --git a/backend/src/utils/releaseSync.js b/backend/src/utils/releaseSync.js index 7499ff9..46ba5aa 100644 --- a/backend/src/utils/releaseSync.js +++ b/backend/src/utils/releaseSync.js @@ -1,12 +1,13 @@ /** * Releases from git (Gitea): every v1.2.3 tag of the Cross Events repo is a release, dated by its - * commit, and the notes come from the repo's WHATS-NEW.md as of the newest tag ("## 1.2.3" sections; - * "urgent" or "security" in the heading marks an urgent release). Runs every 15 minutes and from + * commit, and the notes come from the repo's WHATS-NEW.md on its default branch ("## 1.2.3" sections; + * "urgent" or "security" in the heading marks an urgent release). Notes only attach to tagged + * versions, so a section written ahead of a release stays hidden until it's tagged, and a note can be + * corrected after release without a new version. Runs every 15 minutes and from * "Sync now" on the Releases page, when a repo is set; git is then the only source of releases. */ const prisma = require('../config/db'); -const { compareVersions } = require('./alerts'); const { getSettings, setSettings, releaseRepoToken } = require('./settings'); const { syncLatestVersion } = require('./releases'); @@ -111,9 +112,8 @@ async function syncReleases() { const token = await releaseRepoToken(); const tags = await fetchTags(repo, token); if (!tags.length) throw new Error('The repository has no version tags (v1.2.3) yet.'); - const newest = tags.reduce((a, b) => (compareVersions(b.version, a.version) > 0 ? b : a)); const path = (settings.release_notes_path || 'WHATS-NEW.md').replace(/^\/+/, '').split('/').map(encodeURIComponent).join('/'); - const markdown = await get(`${repo.api}/raw/${path}?ref=v${newest.version}`, token, { raw: true }); + const markdown = await get(`${repo.api}/raw/${path}`, token, { raw: true }); const notes = parseNotes(markdown || ''); const existing = new Map((await prisma.release.findMany()).map(r => [r.version, r])); @@ -138,7 +138,7 @@ async function syncReleases() { const gone = [...existing.values()].filter(r => !tagged.has(r.version)).map(r => r.id); if (gone.length) await prisma.release.deleteMany({ where: { id: { in: gone } } }); const latest = await syncLatestVersion(); - await setSettings({ release_synced_at: new Date().toISOString(), release_sync_error: markdown === null ? `${settings.release_notes_path} was not found at v${newest.version}, so there are no notes.` : '' }); + await setSettings({ release_synced_at: new Date().toISOString(), release_sync_error: markdown === null ? `${settings.release_notes_path} was not found on the default branch, so there are no notes.` : '' }); return { tags: tags.length, added, updated, removed: gone.length, latest }; } catch (e) { await setSettings({ release_sync_error: `${new Date().toISOString()} ${e.message}`.slice(0, 500) }); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index fda3cb3..dd2b611 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "events-hub-frontend", - "version": "1.4.0", + "version": "1.4.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "events-hub-frontend", - "version": "1.4.0", + "version": "1.4.1", "dependencies": { "lucide-react": "^0.536.0", "next": "^15.5.24", diff --git a/frontend/package.json b/frontend/package.json index d3d55bf..36dab03 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "events-hub-frontend", - "version": "1.4.0", + "version": "1.4.1", "private": true, "scripts": { "dev": "next dev -p 3200", diff --git a/frontend/src/app/(hub)/releases/page.tsx b/frontend/src/app/(hub)/releases/page.tsx index 3a5e65e..254ad70 100644 --- a/frontend/src/app/(hub)/releases/page.tsx +++ b/frontend/src/app/(hub)/releases/page.tsx @@ -85,7 +85,7 @@ function GitSource({ source, onSaved, setMsg }: { source: Source; onSaved: () => )} -
Every v1.2.3 tag is a release, and the newest tag is the latest version. The notes come from the file below as of that tag: a ## 1.2.3 heading per version, with urgent or security in the heading for an urgent release. Checked every 15 minutes. Leave the address blank to add releases by hand.
Every v1.2.3 tag is a release, and the newest tag is the latest version. The notes come from the file below on the default branch, for tagged versions only (so they can be written ahead, or corrected later): a ## 1.2.3 heading per version, with urgent or security in the heading for an urgent release. Checked every 15 minutes. Leave the address blank to add releases by hand.