docs: fix archive script labels and change to variable to nextVersion (#10119)

This commit is contained in:
Zack Pollard 2024-06-11 12:37:20 +01:00 committed by GitHub
parent 8568c2e8b9
commit 3c15dae341
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[
{
"label": "1.106.1",
"label": "v1.106.1",
"url": "https://v1.106.1.archive.immich.app"
},
{

View File

@ -1,8 +1,8 @@
#! /usr/bin/env node
const { readFileSync, writeFileSync } = require('node:fs');
const lastVersion = process.argv[2];
if (!lastVersion) {
const nextVersion = process.argv[2];
if (!nextVersion) {
console.log('Usage: archive-version.js <version>');
process.exit(1);
}
@ -10,7 +10,7 @@ if (!lastVersion) {
const filename = './docs/static/archived-versions.json';
const oldVersions = JSON.parse(readFileSync(filename));
const newVersions = [
{ label: lastVersion, url: `https://v${lastVersion}.archive.immich.app` },
{ label: `v${nextVersion}`, url: `https://v${nextVersion}.archive.immich.app` },
...oldVersions,
];