chore(labels): discard unused old stable and experimental labels

- experimental has not been in used since early 2023
- old stable is not longer in use now that LTS are introduced
This commit is contained in:
Earl Warren 2024-12-05 18:17:59 +01:00
parent 66637e941d
commit 98f0c07104
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 1 additions and 32 deletions

View file

@ -115,7 +115,7 @@ _Note that ideally both the mobile (narrow) and desktop (wide) versions should b
- [ ] visit the `rss.xml` feed (⚠️ the menu button points to the `main` version: put the URL manually in case of a pull request with `/@pull_XX` prefix)
- [ ] switch the theme (light/dark)
- [ ] visit the FAQ
- [ ] visit the Releases page (there should be one `Stable` and one `Old Stable` tag)
- [ ] visit the Releases page (there should be one `Stable` and one `LTS` tag)
- [ ] visit the News page
- [ ] visit the News page for a given tag (`report` for instance)
- [ ] visit the first News

View file

@ -10,14 +10,6 @@ switch (label) {
classes = 'bg-green-600 text-white dark:bg-green-800 dark:text-steel-100';
break;
case 'Old Stable':
classes = 'bg-orange-600 text-white dark:bg-orange-800 dark:text-steel-100';
break;
case 'Experimental':
classes = 'bg-blue-100 dark:bg-blue-700';
break;
case 'LTS':
classes = 'bg-teal-600 text-white dark:bg-teal-700 dark:text-steel-100';
break;

View file

@ -57,8 +57,6 @@ class ReleaseVersion {
const _latestReleases = {
stable: new ReleaseVersion(),
oldstable: new ReleaseVersion(),
experimental: new ReleaseVersion(),
lts: new ReleaseVersion(),
};
@ -77,22 +75,9 @@ async function ensureReleasesCached() {
_releases.forEach((release) => {
const rv = new ReleaseVersion(release);
if (release.draft || release.prerelease) {
if (_latestReleases.experimental.compare(rv) == Comparison.LeftIsLower) {
_latestReleases.experimental = rv;
}
return;
}
const stableComparison = _latestReleases.stable.compare(rv);
if (stableComparison == Comparison.LeftIsLower) {
_latestReleases.oldstable = _latestReleases.stable;
_latestReleases.stable = rv;
} else if (
stableComparison != Comparison.Equal &&
_latestReleases.oldstable.compare(rv) == Comparison.LeftIsLower
) {
_latestReleases.oldstable = rv;
}
if (release.tag_name && ltsRegex.exec(release.tag_name) != null) {
@ -101,10 +86,6 @@ async function ensureReleasesCached() {
}
}
});
if (_latestReleases.experimental.compare(_latestReleases.stable) != Comparison.LeftIsGreater) {
// discared experimental if older than stable
_latestReleases.experimental = new ReleaseVersion();
}
}
/** Get the latest Forgejo release from Codeberg using the Forgejo API. */
@ -122,10 +103,6 @@ export const releaseLabel = async (release: Release) => {
switch (release.name) {
case _latestReleases.stable.release?.name:
return 'Stable';
case _latestReleases.oldstable.release?.name:
return 'Old Stable';
case _latestReleases.experimental.release?.name:
return 'Experimental';
case _latestReleases.lts.release?.name:
return 'LTS';
}