Move version! from core:: to clap_utils:: (#6944)
* Move version! from core to clap-utils * Completely move version! from core:: to clap_utils:: * rustfmt * Do remaining transition after rebase
This commit is contained in:
@@ -47,6 +47,7 @@ serde_json = "1.0.41"
|
||||
sha2 = "0.8.0"
|
||||
solana-budget-api = { path = "../programs/budget_api", version = "0.21.0" }
|
||||
solana-budget-program = { path = "../programs/budget_program", version = "0.21.0" }
|
||||
solana-clap-utils = { path = "../clap-utils", version = "0.21.0" }
|
||||
solana-chacha-sys = { path = "../chacha-sys", version = "0.21.0" }
|
||||
solana-client = { path = "../client", version = "0.21.0" }
|
||||
solana-drone = { path = "../drone", version = "0.21.0" }
|
||||
|
@@ -5,24 +5,6 @@
|
||||
//! command-line tools to spin up validators and a Rust library
|
||||
//!
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! version {
|
||||
() => {
|
||||
&*format!(
|
||||
"{}{}",
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
if option_env!("CI_TAG").is_none() {
|
||||
format!(
|
||||
" [channel={} commit={}]",
|
||||
option_env!("CHANNEL").unwrap_or("unknown"),
|
||||
option_env!("CI_COMMIT").unwrap_or("unknown"),
|
||||
)
|
||||
} else {
|
||||
"".to_string()
|
||||
},
|
||||
)
|
||||
};
|
||||
}
|
||||
pub mod banking_stage;
|
||||
pub mod blob;
|
||||
pub mod broadcast_stage;
|
||||
|
@@ -967,7 +967,7 @@ impl RpcSol for RpcSolImpl {
|
||||
|
||||
fn get_version(&self, _: Self::Metadata) -> Result<RpcVersionInfo> {
|
||||
Ok(RpcVersionInfo {
|
||||
solana_core: crate::version!().to_string(),
|
||||
solana_core: solana_clap_utils::version!().to_string(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1714,7 +1714,7 @@ pub mod tests {
|
||||
let expected = json!({
|
||||
"jsonrpc": "2.0",
|
||||
"result": {
|
||||
"solana-core": crate::version!().to_string()
|
||||
"solana-core": solana_clap_utils::version!().to_string()
|
||||
},
|
||||
"id": 1
|
||||
});
|
||||
|
@@ -19,7 +19,7 @@ fn test_rpc_client() {
|
||||
|
||||
assert_eq!(
|
||||
client.get_version().unwrap().solana_core,
|
||||
solana_core::version!()
|
||||
solana_clap_utils::version!()
|
||||
);
|
||||
|
||||
assert_eq!(client.get_balance(&bob_pubkey).unwrap(), 0);
|
||||
|
Reference in New Issue
Block a user