You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-10 23:22:22 +02:00
fix: cache build versions (#17811)
This commit is contained in:
@@ -73,7 +73,10 @@ export class ServerInfoRepository {
|
||||
}
|
||||
}
|
||||
|
||||
buildVersions?: ServerBuildVersions;
|
||||
|
||||
async getBuildVersions(): Promise<ServerBuildVersions> {
|
||||
if (!this.buildVersions) {
|
||||
const { nodeVersion, resourcePaths } = this.configRepository.getEnv();
|
||||
|
||||
const [nodejsOutput, ffmpegOutput, magickOutput] = await Promise.all([
|
||||
@@ -86,7 +89,7 @@ export class ServerInfoRepository {
|
||||
.then((buffer) => JSON.parse(buffer.toString()))
|
||||
.catch(() => this.logger.warn(`Failed to read ${resourcePaths.lockFile}`));
|
||||
|
||||
return {
|
||||
this.buildVersions = {
|
||||
nodejs: nodejsOutput || nodeVersion || '',
|
||||
exiftool: await exiftool.version(),
|
||||
ffmpeg: getLockfileVersion('ffmpeg', lockfile) || ffmpegOutput.replaceAll('ffmpeg version', '') || '',
|
||||
@@ -95,4 +98,7 @@ export class ServerInfoRepository {
|
||||
getLockfileVersion('imagemagick', lockfile) || magickOutput.replaceAll('Version: ImageMagick ', '') || '',
|
||||
};
|
||||
}
|
||||
|
||||
return this.buildVersions;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user