mirror of
https://github.com/immich-app/immich.git
synced 2024-11-15 09:59:00 -07:00
18 lines
525 B
JavaScript
Executable File
18 lines
525 B
JavaScript
Executable File
#! /usr/bin/env node
|
|
const { readFileSync, writeFileSync } = require('node:fs');
|
|
|
|
const nextVersion = process.argv[2];
|
|
if (!nextVersion) {
|
|
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: `v${nextVersion}`, url: `https://v${nextVersion}.archive.immich.app` },
|
|
...oldVersions,
|
|
];
|
|
|
|
writeFileSync(filename, JSON.stringify(newVersions, null, 2) + '\n');
|