forked from hiero-ledger/solo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.ts
More file actions
37 lines (32 loc) · 1.64 KB
/
Copy pathversion.ts
File metadata and controls
37 lines (32 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// SPDX-License-Identifier: Apache-2.0
import {type Version} from './src/types/index.js';
import {fileURLToPath} from 'node:url';
import path from 'node:path';
import {PathEx} from './src/business/utils/path-ex.js';
import fs from 'node:fs';
/**
* This file should only contain versions for dependencies and the function to get the Solo version.
*/
// TODO we should be consistent on the versioning format, let us drop the v prefix from the user, and manually add it
// right before it required, this adds better semver library compatibility
export const HELM_VERSION: string = 'v3.14.2';
export const KIND_VERSION: string = 'v0.29.0';
export const SOLO_CHART_VERSION: string = '0.54.5';
export const HEDERA_PLATFORM_VERSION: string = process.env.CONSENSUS_NODE_VERSION || 'v0.63.9';
export const MIRROR_NODE_VERSION: string = 'v0.134.0';
export const EXPLORER_VERSION: string = '25.0.0';
export const EXPLORER_OLD_VERSION_BEFORE_LABEL_CHANGE: string = '24.12.0';
export const HEDERA_JSON_RPC_RELAY_VERSION: string = '0.70.0';
export const INGRESS_CONTROLLER_VERSION: string = '0.14.5';
export const BLOCK_NODE_VERSION: string = '0.14.0';
export const MINIMUM_HIERO_PLATFORM_VERSION_FOR_BLOCK_NODE: string = 'v0.62.3';
export function getSoloVersion(): Version {
if (process.env.npm_package_version) {
return process.env.npm_package_version;
}
const __filename: string = fileURLToPath(import.meta.url);
const __dirname: string = path.dirname(__filename);
const packageJsonPath: string = PathEx.resolve(__dirname, './package.json');
const packageJson: {version: Version} = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
return packageJson.version;
}