mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
docs: version switcher (#10091)
* docs: version switcher * chore: pump script * chore: fix linting on bash script * chore: remove 1.106.0 from archived versions * chore: change version archive script to take next server version not current version --------- Co-authored-by: Zack Pollard <zackpollard@ymail.com>
This commit is contained in:
parent
05874bd84e
commit
321c3ccfc6
6 changed files with 95 additions and 0 deletions
17
misc/release/archive-version.js
Executable file
17
misc/release/archive-version.js
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#! /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');
|
||||
|
|
@ -83,4 +83,6 @@ sed -i "s/version_number: \"$CURRENT_SERVER\"$/version_number: \"$NEXT_SERVER\"/
|
|||
sed -i "s/\"android\.injected\.version\.code\" => $CURRENT_MOBILE,/\"android\.injected\.version\.code\" => $NEXT_MOBILE,/" mobile/android/fastlane/Fastfile
|
||||
sed -i "s/^version: $CURRENT_SERVER+$CURRENT_MOBILE$/version: $NEXT_SERVER+$NEXT_MOBILE/" mobile/pubspec.yaml
|
||||
|
||||
./misc/release/archive-version.js "$NEXT_SERVER"
|
||||
|
||||
echo "IMMICH_VERSION=v$NEXT_SERVER" >>"$GITHUB_ENV"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue