diff --git a/.github/workflows/release-10_branchoff-stable.yml b/.github/workflows/release-10_branchoff-stable.yml index adce1b261b71f7f7ee6795403c4651cfab889f23..cfe135ac7299e9e0bc53eda6f2c333d58f994bdd 100644 --- a/.github/workflows/release-10_branchoff-stable.yml +++ b/.github/workflows/release-10_branchoff-stable.yml @@ -92,8 +92,11 @@ jobs: . ./.github/scripts/release/release_lib.sh NODE_VERSION="${{ needs.prepare-tooling.outputs.node_version }}" - set_version "\(NODE_VERSION[^=]*= \)\".*\"" $NODE_VERSION "polkadot/node/primitives/src/lib.rs" + NODE_VERSION_PATTERN="\(NODE_VERSION[^=]*= \)\".*\"" + set_version $NODE_VERSION_PATTERN $NODE_VERSION "polkadot/node/primitives/src/lib.rs" commit_with_message "Bump node version to $NODE_VERSION in polkadot-cli" + set_version $NODE_VERSION_PATTERN $NODE_VERSION "cumulus/polkadot-omni-node/lib/src/nodes/mod.rs" + commit_with_message "Bump node version to $NODE_VERSION in polkadot-omni-node-lib" SPEC_VERSION=$(get_spec_version $NODE_VERSION) runtimes_list=$(get_filtered_runtimes_list) diff --git a/cumulus/polkadot-omni-node/lib/src/lib.rs b/cumulus/polkadot-omni-node/lib/src/lib.rs index ccc1b542b253dd9e002baf3f62f23a6dc3b32f02..92ea3d7d8791f9929dbebdbb9f8d3de897e077f3 100644 --- a/cumulus/polkadot-omni-node/lib/src/lib.rs +++ b/cumulus/polkadot-omni-node/lib/src/lib.rs @@ -26,3 +26,4 @@ mod nodes; pub use cli::CliConfig; pub use command::{run, RunConfig}; pub use common::{chain_spec, runtime}; +pub use nodes::NODE_VERSION; diff --git a/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs b/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs index ab13322e80ab9123732b427107c540107c38068d..5570170f90b2d55c0caa4627e44a4649c841e32c 100644 --- a/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs +++ b/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs @@ -22,6 +22,11 @@ use cumulus_primitives_core::ParaId; use manual_seal::ManualSealNode; use sc_service::{Configuration, TaskManager}; +/// The current node version for cumulus official binaries, which takes the basic +/// SemVer form `<major>.<minor>.<patch>`. It should correspond to the latest +/// `polkadot` version of a stable release. +pub const NODE_VERSION: &'static str = "1.17.1"; + /// Trait that extends the `DynNodeSpec` trait with manual seal related logic. /// /// We need it in order to be able to access both the `DynNodeSpec` and the manual seal logic diff --git a/cumulus/polkadot-omni-node/src/main.rs b/cumulus/polkadot-omni-node/src/main.rs index a6c1dd3cadbb0c90c1103d62db09d6b29e8bc556..1183f488df8b1525dbc33384abbb8c637d8c8263 100644 --- a/cumulus/polkadot-omni-node/src/main.rs +++ b/cumulus/polkadot-omni-node/src/main.rs @@ -23,14 +23,15 @@ use polkadot_omni_node_lib::{ chain_spec::DiskChainSpecLoader, run, runtime::DefaultRuntimeResolver, CliConfig as CliConfigT, - RunConfig, + RunConfig, NODE_VERSION, }; struct CliConfig; impl CliConfigT for CliConfig { fn impl_version() -> String { - env!("SUBSTRATE_CLI_IMPL_VERSION").into() + let commit_hash = env!("SUBSTRATE_CLI_COMMIT_HASH"); + format!("{}-{commit_hash}", NODE_VERSION) } fn author() -> String { diff --git a/cumulus/polkadot-parachain/src/main.rs b/cumulus/polkadot-parachain/src/main.rs index 61764636a0600f58578f87539ed857bb78d4e51a..a84fb0dfb18f8c9f86d3b8c481b682c82ddfec7b 100644 --- a/cumulus/polkadot-parachain/src/main.rs +++ b/cumulus/polkadot-parachain/src/main.rs @@ -21,13 +21,14 @@ mod chain_spec; -use polkadot_omni_node_lib::{run, CliConfig as CliConfigT, RunConfig}; +use polkadot_omni_node_lib::{run, CliConfig as CliConfigT, RunConfig, NODE_VERSION}; struct CliConfig; impl CliConfigT for CliConfig { fn impl_version() -> String { - env!("SUBSTRATE_CLI_IMPL_VERSION").into() + let commit_hash = env!("SUBSTRATE_CLI_COMMIT_HASH"); + format!("{}-{commit_hash}", NODE_VERSION) } fn author() -> String {