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

ambee/giterated

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

Huge refactor to prep for moving the daemon over to the plugin architecture

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨5df753c

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