mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
18 lines
518 B
JavaScript
18 lines
518 B
JavaScript
|
|
#! /usr/bin/env node
|
||
|
|
const { readFileSync, writeFileSync } = require('node:fs');
|
||
|
|
|
||
|
|
const lastVersion = process.argv[2];
|
||
|
|
if (!lastVersion) {
|
||
|
|
console.log('Usage: archive-version.js <version>');
|
||
|
|
process.exit(1);
|
||
|
|
}
|
||
|
|
|
||
|
|
const filename = './docs/static/archived-versions.json';
|
||
|
|
const oldVersions = JSON.parse(readFileSync(filename));
|
||
|
|
const newVersions = [
|
||
|
|
{ label: lastVersion, url: `https://${lastVersion}.archive.immich.app` },
|
||
|
|
...oldVersions,
|
||
|
|
];
|
||
|
|
|
||
|
|
writeFileSync(filename, JSON.stringify(newVersions, null, 2) + '\n');
|