Skip to content

Commit f468712

Browse files
authored
feat: add full git version to version output (#10)
## 📝 Summary Output before was missing the full git version: ``` commit: 7688350 dirty: true branch: refs/heads/flamegraph-test build_time: Wed, 3 Jul 2024 12:16:26 +0000 rustc: rustc 1.79.0 (129f3b996 2024-06-10) features: [] profile: debug ``` This PR fixes it: ``` version: v0.1.0-rc1-1-g7688350 commit: 7688350 dirty: true branch: refs/heads/flamegraph-test build_time: Wed, 3 Jul 2024 12:16:26 +0000 rustc: rustc 1.79.0 (129f3b996 2024-06-10) features: [] profile: debug ``` ## 💡 Motivation and Context Tag is a relevant piece of information and should be surfaced too --- ## ✅ I have completed the following steps: * [x] Run `make lint` * [x] Run `make test` * [ ] Added tests (if applicable)
1 parent 3e547d4 commit f468712

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/rbuilder/src/utils/build_info.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ mod internal {
55
}
66

77
use internal::{
8-
BUILT_TIME_UTC, FEATURES, GIT_COMMIT_HASH_SHORT, GIT_DIRTY, GIT_HEAD_REF, PROFILE,
8+
BUILT_TIME_UTC, FEATURES, GIT_COMMIT_HASH_SHORT, GIT_DIRTY, GIT_HEAD_REF, GIT_VERSION, PROFILE,
99
RUSTC_VERSION,
1010
};
1111

1212
pub fn print_version_info() {
13+
println!("version: {}", GIT_VERSION.unwrap_or_default());
1314
println!("commit: {}", GIT_COMMIT_HASH_SHORT.unwrap_or_default());
1415
println!("dirty: {}", GIT_DIRTY.unwrap_or_default());
1516
println!("branch: {}", GIT_HEAD_REF.unwrap_or_default());

0 commit comments

Comments
 (0)