2020-11-24 19:06:49 +01:00
|
|
|
use crate::{config::Settings, count::count_repositories};
|
2019-06-12 21:51:54 +02:00
|
|
|
use std::sync::atomic::AtomicUsize;
|
2019-05-14 01:11:39 +02:00
|
|
|
|
|
|
|
pub struct VersionInfo<'a> {
|
|
|
|
pub commit: &'a str,
|
|
|
|
pub version: &'a str,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub(crate) const VERSION_INFO: VersionInfo = VersionInfo {
|
|
|
|
commit: env!("VERGEN_SHA_SHORT"),
|
|
|
|
version: env!("CARGO_PKG_VERSION"),
|
|
|
|
};
|
|
|
|
pub(crate) const CSS: &str = include_str!("../static/tacit-css.min.css");
|
|
|
|
pub(crate) const FAVICON: &[u8] = include_bytes!("../static/favicon32.png");
|
|
|
|
|
|
|
|
lazy_static! {
|
2020-02-12 19:45:18 +01:00
|
|
|
pub(crate) static ref CLIENT: reqwest::Client = reqwest::Client::new();
|
2020-11-24 19:06:49 +01:00
|
|
|
pub(crate) static ref OPT: Settings = Settings::new().unwrap();
|
2019-06-12 21:51:54 +02:00
|
|
|
pub(crate) static ref REPO_COUNT: AtomicUsize =
|
2020-11-24 19:06:49 +01:00
|
|
|
AtomicUsize::new(count_repositories(&OPT.repodir).unwrap());
|
2019-05-14 01:11:39 +02:00
|
|
|
}
|