-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e2dd0d
commit 85537af
Showing
13 changed files
with
44 additions
and
41 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ | |
pub mod dir; | ||
pub mod log; | ||
pub mod submodules; | ||
pub mod version; | ||
|
||
shadow_rs::shadow!(build_info); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/// Returns the short commit hash | ||
pub const fn get_trin_short_version_commit() -> &'static str { | ||
crate::build_info::short_commit() | ||
} | ||
|
||
/// Returns the full trin version | ||
pub const fn get_trin_version() -> &'static str { | ||
const_format::formatcp!( | ||
"{version}-{hash} {build_os} {rust_version}", | ||
// Remove -alpha.1 versioning if it is present. | ||
// This must be done as it can conflict with eth versioning | ||
version = const_format::str_split!(crate::build_info::PKG_VERSION, '-')[0], | ||
hash = crate::build_info::short_commit(), | ||
build_os = crate::build_info::BUILD_OS, | ||
// the rust version looks like that: | ||
// rustc 1.77.0 (aedd173a2 2024-03-17) | ||
// we remove everything in the brackets and replace spaces with nothing | ||
rust_version = const_format::str_replace!( | ||
const_format::str_split!(crate::build_info::RUST_VERSION, '(')[0], | ||
' ', | ||
"" | ||
) | ||
) | ||
} |