Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align omni-node and polkadot-parachain versions #7367

Merged
4 changes: 3 additions & 1 deletion .github/workflows/release-10_branchoff-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ 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"
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-cli"
iulianbarbu marked this conversation as resolved.
Show resolved Hide resolved

SPEC_VERSION=$(get_spec_version $NODE_VERSION)
Expand Down
1 change: 1 addition & 0 deletions cumulus/polkadot-omni-node/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
5 changes: 5 additions & 0 deletions cumulus/polkadot-omni-node/lib/src/nodes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.0";
iulianbarbu marked this conversation as resolved.
Show resolved Hide resolved
iulianbarbu marked this conversation as resolved.
Show resolved Hide resolved

/// 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
Expand Down
5 changes: 3 additions & 2 deletions cumulus/polkadot-omni-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 3 additions & 2 deletions cumulus/polkadot-parachain/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading