Skip to main content

render_projection

Function render_projection 

Source
pub fn render_projection(version: &str) -> String
Expand description

The body of PROJECTION: one version= line, which bin/majordomus reads with shell builtins alone. majordomus generate puts its provenance banner above it.

use majordomus_cli::release::version::{parse_projection, render_projection};
assert_eq!(render_projection("0.9.0"), "version=0.9.0\n");
assert_eq!(parse_projection(&render_projection("0.9.0")).as_deref(), Some("0.9.0"));