Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Jun 20, 2024
1 parent 7abc723 commit 9475ce4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
// You should have received a copy of the GNU General Public License
// along with Darwinia. If not, see <https://www.gnu.org/licenses/>.

/// 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 = "6.6.3";

/// Sub-commands supported by the collator.
#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
Expand Down
6 changes: 4 additions & 2 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use cumulus_primitives_core::ParaId;
// darwinia
use crate::{
chain_spec::*,
cli::{Cli, FrontierBackendType, RelayChainCli, Subcommand},
cli::{Cli, FrontierBackendType, RelayChainCli, Subcommand, NODE_VERSION},
service::{self, *},
};
// substrate
Expand All @@ -44,7 +44,9 @@ impl SubstrateCli for Cli {
}

fn impl_version() -> String {
env!("SUBSTRATE_CLI_IMPL_VERSION").into()
let commit_hash = env!("SUBSTRATE_CLI_COMMIT_HASH");

format!("{NODE_VERSION}-{commit_hash}")
}

fn description() -> String {
Expand Down

0 comments on commit 9475ce4

Please sign in to comment.