Anki/rslib/src/version.rs
2020-06-01 13:57:10 +10:00

24 lines
581 B
Rust

// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
use lazy_static::lazy_static;
pub fn version() -> &'static str {
include_str!("../../meta/version").trim()
}
pub fn buildhash() -> &'static str {
include_str!("../../meta/buildhash")
}
pub(crate) fn sync_client_version() -> &'static str {
lazy_static! {
static ref VER: String = format!(
"anki,{} ({}),{}",
version(),
buildhash(),
std::env::consts::OS
);
}
&VER
}