UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

14 lines 811 B
// SPDX-License-Identifier: Apache-2.0 import { SemanticVersion } from '../business/utils/semantic-version.js'; import { SoloError } from './errors/solo-error.js'; export function assertUpgradeVersionNotOlder(componentName, targetVersion, currentVersion, flagHint) { if (!currentVersion || currentVersion.equals('0.0.0')) { return; } const targetSemVersion = new SemanticVersion(targetVersion); if (targetSemVersion.lessThan(currentVersion)) { throw new SoloError(`${componentName} upgrade target version ${targetVersion} is older than the current version ${currentVersion.toString()} stored in remote config. ` + `Use ${flagHint} to specify a version equal to or newer than the currently deployed version.`); } } //# sourceMappingURL=upgrade-version-guard.js.map