Skip to content

Commit

Permalink
test build_info
Browse files Browse the repository at this point in the history
  • Loading branch information
sukoneck committed Nov 12, 2024
1 parent 5fa7c52 commit 77a7f4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
git config --global --add safe.directory "$(pwd)"
. $HOME/.cargo/env
cargo build --release --target ${{ matrix.configs.target }}
./target/${{ matrix.configs.target }}/release/rbuilder version
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions src/build_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ mod internal {
}

use internal::{
BUILT_TIME_UTC, FEATURES, GIT_COMMIT_HASH_SHORT, GIT_DIRTY, GIT_HEAD_REF, PROFILE,
RUSTC_VERSION, CI_PLATFORM,
BUILT_TIME_UTC, FEATURES, GIT_COMMIT_HASH_SHORT, GIT_HEAD_REF, PROFILE,
RUSTC_VERSION, CI_PLATFORM, // GIT_DIRTY,
};
use rbuilder::utils::build_info::Version;

pub fn print_version_info() {
// println!("dirty: {}", GIT_DIRTY.unwrap_or_default());
println!("commit: {}", GIT_COMMIT_HASH_SHORT.unwrap_or_default());
println!("branch: {}", GIT_HEAD_REF.unwrap_or_default());
println!("build_platform: {}", CI_PLATFORM);
println!("build_platform: {:?}", CI_PLATFORM);
println!("build_time: {}", BUILT_TIME_UTC);
println!("features: {:?}", FEATURES);
println!("profile: {}", PROFILE);
Expand Down

0 comments on commit 77a7f4a

Please sign in to comment.