sastri 0.1.0

Scaffold multi-ecosystem packaging and CI/CD for Rust CLIs (Homebrew, Scoop, PyPI, npm, Hex, mise, asdf, …)
Documentation
use super::{
    asdf, ci, github_releases, haskell_cabal, hex, homebrew, install_sh, mise, npm, pypi, ruby_gem,
    scoop, setup_action, Mechanism,
};

/// All known mechanisms. Order = generate / progress order.
pub fn all() -> Vec<&'static dyn Mechanism> {
    vec![
        &ci::Ci,
        &github_releases::GithubReleases,
        &install_sh::InstallSh,
        &homebrew::Homebrew,
        &scoop::Scoop,
        &asdf::Asdf,
        &mise::Mise,
        &setup_action::SetupAction,
        &npm::Npm,
        &pypi::Pypi,
        &hex::Hex,
        &ruby_gem::RubyGem,
        &haskell_cabal::HaskellCabal,
    ]
}

pub fn by_id(id: &str) -> Option<&'static dyn Mechanism> {
    all().into_iter().find(|m| m.id() == id)
}