mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
Make the node version independent of the crate version (#1495)
This commit is contained in:
@@ -19,8 +19,15 @@
|
||||
use clap::Parser;
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// The version of the node. The passed-in version of the workers should match this.
|
||||
pub const NODE_VERSION: &'static str = env!("SUBSTRATE_CLI_IMPL_VERSION");
|
||||
/// The version of the node.
|
||||
///
|
||||
/// This is the version that is used for versioning this node binary.
|
||||
/// By default the `minor` version is bumped in every release. `Major` or `patch` releases are only
|
||||
/// expected in very rare cases.
|
||||
///
|
||||
/// The worker binaries associated to the node binary should ensure that they are using the same
|
||||
/// version as the main node that started them.
|
||||
pub const NODE_VERSION: &'static str = "1.1.0";
|
||||
|
||||
#[allow(missing_docs)]
|
||||
#[derive(Debug, Parser)]
|
||||
|
||||
@@ -55,7 +55,8 @@ impl SubstrateCli for Cli {
|
||||
}
|
||||
|
||||
fn impl_version() -> String {
|
||||
NODE_VERSION.into()
|
||||
let commit_hash = env!("SUBSTRATE_CLI_COMMIT_HASH");
|
||||
format!("{NODE_VERSION}-{commit_hash}")
|
||||
}
|
||||
|
||||
fn description() -> String {
|
||||
|
||||
Reference in New Issue
Block a user