-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from xelis-project/dev
Version 1.7.0
- Loading branch information
Showing
64 changed files
with
3,894 additions
and
1,535 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
[workspace] | ||
resolver = "2" | ||
|
||
members = [ | ||
"xelis_common", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// This file is executed before the build and fetch the commit hash from git | ||
// we create the build version and set it as an environment variable for the build. | ||
|
||
use std::process::Command; | ||
|
||
fn main() { | ||
// Run git command to get the commit hash | ||
let output = Command::new("git") | ||
.args(&["rev-parse", "--short", "HEAD"]) | ||
.output() | ||
.expect("Failed to execute git command"); | ||
|
||
// Convert the commit hash to a string | ||
let commit_hash = String::from_utf8_lossy(&output.stdout).trim().to_string(); | ||
|
||
// Set the result as an environment variable for the build | ||
let build_version = format!("{}-{}", env!("CARGO_PKG_VERSION"), commit_hash); | ||
println!("cargo:rerun-if-env-changed=BUILD_VERSION"); | ||
println!("cargo:BUILD_VERSION={}", build_version); | ||
println!("cargo:rustc-env=BUILD_VERSION={}", build_version); | ||
} |
Oops, something went wrong.