Skip to main content

gitkraft_core/
about.rs

1//! Application metadata shown in the "About" dialogs of the GUI and TUI.
2
3/// Application name.
4pub const APP_NAME: &str = "GitKraft";
5/// Current version (taken from the workspace `Cargo.toml`).
6pub const VERSION: &str = env!("CARGO_PKG_VERSION");
7/// Short project description.
8pub const DESCRIPTION: &str =
9    "A modern Git IDE with a desktop GUI (Iced) and a terminal UI (Ratatui), \
10     sharing one Rust core.";
11/// Author's display name.
12pub const AUTHOR_NAME: &str = "Sorin Irimies";
13/// Author's GitHub handle.
14pub const AUTHOR_GITHUB: &str = "sorinirimies";
15/// Author's GitHub profile URL.
16pub const AUTHOR_URL: &str = "https://github.com/sorinirimies";
17/// Project repository URL.
18pub const REPO_URL: &str = "https://github.com/sorinirimies/gitkraft";
19/// License identifier.
20pub const LICENSE: &str = "MIT";
21
22/// Version label such as `v1.1.6`.
23pub fn version_label() -> String {
24    format!("v{VERSION}")
25}
26
27#[cfg(test)]
28mod tests {
29    use super::*;
30
31    #[test]
32    fn version_label_has_prefix() {
33        assert_eq!(version_label(), format!("v{}", VERSION));
34        assert!(!VERSION.is_empty());
35    }
36}