Skip to content

Commit

Permalink
Merge pull request #424 from doitian/bugfix/fix-compilation-error-on-…
Browse files Browse the repository at this point in the history
…git-not-available

Fix compilation error on git not available
  • Loading branch information
doitian authored Dec 27, 2024
2 parents 6042adc + 662d221 commit 66798d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ pub mod tasks;

use git_version::git_version;

const GIT_VERSION: &str = git_version!();
const GIT_VERSION: &str = git_version!(fallback = "unknown");

pub fn get_git_versin() -> &'static str {
pub fn get_git_version() -> &'static str {
GIT_VERSION
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub async fn main() -> Result<(), ExitMessage> {
.try_init()
.map_err(|err| ExitMessage(format!("failed to initialize logger: {}", err)))?;

info!("Starting node with git version {}", fnn::get_git_versin());
info!("Starting node with git version {}", fnn::get_git_version());

let _span = info_span!("node", node = fnn::get_node_prefix()).entered();

Expand Down
2 changes: 1 addition & 1 deletion src/rpc/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ where
{
async fn node_info(&self) -> Result<NodeInfoResult, ErrorObjectOwned> {
let version = env!("CARGO_PKG_VERSION").to_string();
let commit_hash = crate::get_git_versin().to_string();
let commit_hash = crate::get_git_version().to_string();

let message =
|rpc_reply| NetworkActorMessage::Command(NetworkActorCommand::NodeInfo((), rpc_reply));
Expand Down

0 comments on commit 66798d1

Please sign in to comment.