semver-cargo 0.2.0

A SemVer-Release plugin for updating and publish cargo project releases.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::Config;
use semver_common::{Alert, Version};

pub fn parse_args(args: Vec<String>) -> Result<(Config, Version), Alert> {
    let config_str = args.get(1).ok_or("No configuration supplied.")?;
    let version_str = args.get(1).ok_or("No version supplied.")?;
    let config: Config = serde_json::from_str(config_str)?;
    let version: Version = serde_json::from_str(version_str)?;
    Ok((config, version))
}