mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove static usage at compile-time of GIT_INFO to enable builds outside of a git repo
This commit is contained in:
parent
8e39313321
commit
bdf4563c6a
2 changed files with 8 additions and 3 deletions
|
@ -36,6 +36,11 @@ pub mod prefs;
|
|||
pub mod resource_files;
|
||||
pub mod thread;
|
||||
|
||||
pub fn servo_version() -> &'static str {
|
||||
concat!("Servo ", env!("CARGO_PKG_VERSION"), env!("GIT_INFO"))
|
||||
pub fn servo_version() -> String {
|
||||
let cargo_version = env!("CARGO_PKG_VERSION");
|
||||
let git_info = option_env!("GIT_INFO");
|
||||
match git_info {
|
||||
Some(info) => format!("Servo {}{}", cargo_version, info),
|
||||
None => format!("Servo {}", cargo_version),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue