Files
harbor-net/src/shared/versions.js
Dmitriy Petrov 0480e617cd
All checks were successful
Build and Deploy Gateway / build-and-push (push) Successful in 16s
Build and Deploy Gateway / deploy (push) Successful in 7s
Bump Harbor versions and adjust subscribed desktop layout
2026-07-12 15:22:18 +03:00

28 lines
874 B
JavaScript

export const HARBOR_VERSIONS = Object.freeze({
macClient: '0.7.19',
gatewayClient: '0.7.19',
gatewayBackend: '0.7.1',
});
export function parseVersion(value) {
const match = /^(\d+)\.(\d+)\.(\d+)$/.exec(String(value || ''));
return match ? {
major: Number(match[1]),
minor: Number(match[2]),
hotfix: Number(match[3]),
} : null;
}
export function versionCompatibility(versions) {
const mac = parseVersion(versions?.macClient);
const client = parseVersion(versions?.gatewayClient);
const backend = parseVersion(versions?.gatewayBackend);
const major = Boolean(mac && client && backend
&& mac.major === client.major
&& client.major === backend.major);
const gateway = Boolean(client && backend
&& client.major === backend.major
&& client.minor === backend.minor);
return { compatible: major && gateway, major, gateway };
}