JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Progress on refactor

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨c9f076f

⁨giterated-daemon/src/lib.rs⁩ - ⁨497⁩ bytes
Raw
1 use std::str::FromStr;
2
3 use semver::{Version, VersionReq};
4
5 pub mod authentication;
6 pub mod backend;
7 pub mod cache_backend;
8 pub mod connection;
9 pub mod database_backend;
10 pub mod federation;
11 pub mod keys;
12 pub mod message;
13
14 #[macro_use]
15 extern crate tracing;
16
17 pub fn version() -> Version {
18 Version::from_str(env!("CARGO_PKG_VERSION")).unwrap()
19 }
20
21 pub fn validate_version(other: &Version) -> bool {
22 let version_req = VersionReq::from_str("=0.0.6").unwrap();
23
24 version_req.matches(other)
25 }
26