mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
8a866297f7
* docs: fix archive version url to include v prefix * docs: fix archived versions to add missing v to 1.106.1
17 lines
519 B
JavaScript
Executable file
17 lines
519 B
JavaScript
Executable file
#! /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://v${lastVersion}.archive.immich.app` },
|
|
...oldVersions,
|
|
];
|
|
|
|
writeFileSync(filename, JSON.stringify(newVersions, null, 2) + '\n');
|