-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Make the node version independent of the crate version #1495
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean, okay, we don't want to use the commit hash in node version, but why the node version should be independent from the crate version in the first place?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because crates.io semver works differently to how we version our nodes. |
||
|
|
||
| #[allow(missing_docs)] | ||
| #[derive(Debug, Parser)] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ use tokio::{io, net::UnixStream, runtime::Runtime}; | |
| /// spawning the desired worker. | ||
| #[macro_export] | ||
| macro_rules! decl_worker_main { | ||
| ($expected_command:expr, $entrypoint:expr, $worker_version:expr) => { | ||
| ($expected_command:expr, $entrypoint:expr, $worker_version:expr $(,)*) => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice 👍 |
||
| fn print_help(expected_command: &str) { | ||
| println!("{} {}", expected_command, $worker_version); | ||
| println!(); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.