Helmule MVP

Basic functionality is there, helmule can mirror helm chart with small
modifications
This commit is contained in:
2024-01-22 08:52:11 +01:00
parent 2f8170cf95
commit aabcb21f3b
53 changed files with 4817 additions and 5 deletions

10
helmudi/Cargo.toml Normal file
View File

@ -0,0 +1,10 @@
[package]
name = "helmudi"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
clap = { version = "4.4.18", features = ["derive"] }
helmzoo_lib = { path = "../lib" }

46
helmudi/src/main.rs Normal file
View File

@ -0,0 +1,46 @@
use std::{error::Error, process::exit};
use helmzoo_lib::{
self,
output::{message_empty, message_error},
};
use clap::Parser;
/// Simple program to greet a person
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Args {
/// Name of the working dir
#[arg(short, long)]
workdir: Option<String>,
/// Path to the configuration file
#[arg(short, long)]
config: String,
/// Dry run
#[arg(short, long, default_value = "false")]
dry_run: bool,
#[arg(long, default_value = "false")]
skip_prerequisites_check: bool,
/// Init git patch. Use it if you want to create git patch for a chart
/// It's going to pull a chart and init a git repo there, so you can
/// apply changes and create a patch file
/// It's not going to try mirroring changes, but will apply extensions
/// and patches that are already defined
#[arg(long)]
init_git_patch: Option<Vec<String>>,
}
fn exec(args: Args) -> Result<(), Box<dyn Error>> {
let workdir_path = helmzoo_lib::workdir::setup_workdir(args.workdir)?;
Ok(())
}
fn main() {
match exec(Args::parse()) {
Ok(()) => message_empty("Thanks for using helmule"),
Err(err) => {
message_error(err);
exit(1)
}
}
}