aboutsummaryrefslogtreecommitdiffstats
path: root/ports/libsimpleservo/api/src
diff options
context:
space:
mode:
authors-maurice <51819025+s-maurice@users.noreply.github.com>2022-03-06 01:43:46 +0100
committers-maurice <51819025+s-maurice@users.noreply.github.com>2022-03-06 01:43:46 +0100
commit4784564d5c778e42d9dcf9431285a07de3ff04f2 (patch)
treea0549ca08826392a45eabab7a48addfce267db6d /ports/libsimpleservo/api/src
parentd551e63b295f0fc713a4545077da6eafed98b573 (diff)
downloadservo-4784564d5c778e42d9dcf9431285a07de3ff04f2.tar.gz
servo-4784564d5c778e42d9dcf9431285a07de3ff04f2.zip
move servo_version from config crate to ports/libsimpleservo/api/src/lib.rs and duplicate in ports/winit/main2.rs
Signed-off-by: s-maurice <51819025+s-maurice@users.noreply.github.com>
Diffstat (limited to 'ports/libsimpleservo/api/src')
-rw-r--r--ports/libsimpleservo/api/src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/ports/libsimpleservo/api/src/lib.rs b/ports/libsimpleservo/api/src/lib.rs
index 7fade0fcf28..7f4950d099b 100644
--- a/ports/libsimpleservo/api/src/lib.rs
+++ b/ports/libsimpleservo/api/src/lib.rs
@@ -185,7 +185,12 @@ pub struct ServoGlue {
}
pub fn servo_version() -> String {
- servo::config::servo_version()
+ 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),
+ }
}
/// Test if a url is valid.