canic-host 0.99.7

Host-side App build, Fleet install, deployment, and release-set library for Canic workspaces
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::{
    options::InstallRootOptions, state::validate_state_name, truth_check::validate_expected_app_id,
};
use canic_core::ids::FleetName;
use std::path::Path;

pub(super) fn resolve_install_identity(
    options: &InstallRootOptions,
    config_path: &Path,
    app_id: &str,
) -> Result<(String, String), Box<dyn std::error::Error>> {
    validate_expected_app_id(options.expected_app.as_deref(), app_id, config_path)?;
    validate_state_name(app_id)?;
    let fleet_name = options.fleet_name.parse::<FleetName>()?;
    Ok((app_id.to_string(), fleet_name.to_string()))
}