pub fn analyze(
root: &Path,
registry: &CapabilityRegistry,
objects: &[Object],
since: Option<&str>,
) -> Result<VersionPlan, SurfaceError>Expand description
The one analysis. Everything that answers a version question calls this.
use majordomus_cli::capability::registry::CapabilityRegistry;
use majordomus_cli::release::compat::analyze;
let registry = CapabilityRegistry::builder().build().expect("an empty registry composes");
let dir = tempfile::tempdir().unwrap();
// A repository that has published nothing has no baseline, and the analysis refuses
// rather than reporting an empty diff — which would read as "nothing changed".
assert!(analyze(dir.path(), ®istry, &[], None).is_err());