pub fn tool(root: &Path) -> Option<String>Expand description
The version the shell tool prints: what PROJECTION states.
use majordomus_cli::release::version::{tool, PROJECTION};
let dir = tempfile::tempdir().unwrap();
assert_eq!(tool(dir.path()), None, "no projection, no version");
std::fs::create_dir_all(dir.path().join("share")).unwrap();
std::fs::write(dir.path().join(PROJECTION), "version=0.9.0\n").unwrap();
assert_eq!(tool(dir.path()).as_deref(), Some("0.9.0"));