fix: keep README release banner current

This commit is contained in:
KoalaDev
2026-08-25 14:24:19 +02:00
parent 6ff49c75cf
commit eb925eca5e
3 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
<p align="center"><i>KoalaSync is a lightweight Browser Extension and Relay Server for synchronized video playback on almost any website with a video element—YouTube, Twitch, Netflix, Emby, Jellyfin, and beyond. Built with a focus on <b>Data Sovereignty</b> and <b>Performance</b>.</i></p> <p align="center"><i>KoalaSync is a lightweight Browser Extension and Relay Server for synchronized video playback on almost any website with a video element—YouTube, Twitch, Netflix, Emby, Jellyfin, and beyond. Built with a focus on <b>Data Sovereignty</b> and <b>Performance</b>.</i></p>
<p align="center"><a href="docs/CHANGELOG.md"><b>New v3.1.4 Release!</b> — See what's changed</a></p> <p align="center"><a href="docs/CHANGELOG.md"><b>New v3.1.5 Release!</b> — See what's changed</a></p>
### 🌟 Why KoalaSync? ### 🌟 Why KoalaSync?
+6
View File
@@ -65,6 +65,12 @@ export function prepareRelease(version, date = new Date()) {
`Release-v${version}-blue`, `Release-v${version}-blue`,
'README.md release badge' 'README.md release badge'
); );
updateText(
'README.md',
/New v\d+\.\d+\.\d+ Release!/gu,
`New v${version} Release!`,
'README.md release banner'
);
console.log(`Prepared release v${version} at ${timestamp}`); console.log(`Prepared release v${version} at ${timestamp}`);
} }
+2
View File
@@ -5,6 +5,8 @@ describe('release preparation helpers', () => {
it('replaces one and only one version marker', () => { it('replaces one and only one version marker', () => {
expect(replaceExactly('version=3.1.4', /version=\d+\.\d+\.\d+/gu, 'version=3.1.5', 'fixture')) expect(replaceExactly('version=3.1.4', /version=\d+\.\d+\.\d+/gu, 'version=3.1.5', 'fixture'))
.toBe('version=3.1.5'); .toBe('version=3.1.5');
expect(replaceExactly('New v3.1.4 Release!', /New v\d+\.\d+\.\d+ Release!/gu, 'New v3.1.5 Release!', 'README.md release banner'))
.toBe('New v3.1.5 Release!');
expect(() => replaceExactly('none', /version=\d+/gu, 'version=4', 'fixture')) expect(() => replaceExactly('none', /version=\d+/gu, 'version=4', 'fixture'))
.toThrow('fixture must contain exactly one release-version marker'); .toThrow('fixture must contain exactly one release-version marker');
expect(() => replaceExactly('version=1 version=2', /version=\d+/gu, 'version=3', 'fixture')) expect(() => replaceExactly('version=1 version=2', /version=\d+/gu, 'version=3', 'fixture'))