Skip to content

Commit

Permalink
cleanup: back to square one
Browse files Browse the repository at this point in the history
  • Loading branch information
icepuma committed Jul 22, 2024
1 parent d448f8f commit 2efc3e0
Show file tree
Hide file tree
Showing 16 changed files with 1 addition and 1,437 deletions.
762 changes: 0 additions & 762 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 1 addition & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,9 @@ readme = "README.md"
license-file = "LICENSE"

[dependencies]
anyhow = "1"
clap = { version = "4", features = ["derive"] }
colored = "2"
dirs = "5"
elevate = "0.6"
hcl-rs = "0.18"
indexmap = { version = "2", features = ["std"] }
os_info = "3"
serde = { version = "1", features = ["derive"] }
shellexpand = "3"
walkdir = "2"
which = "6"
anyhow = "1.0.86"

[dev-dependencies]
indoc = "2"
pretty_assertions = "1"
tempfile = "3"

[profile.release]
lto = true
Expand Down
1 change: 0 additions & 1 deletion examples/.npmrc

This file was deleted.

Empty file removed examples/empty_recipe.hcl
Empty file.
8 changes: 0 additions & 8 deletions examples/recipe.hcl

This file was deleted.

30 changes: 0 additions & 30 deletions src/cli.rs

This file was deleted.

45 changes: 0 additions & 45 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,48 +1,3 @@
use std::fs::canonicalize;

use clap::Parser;
use cli::{Apply, Options};
use colored::Colorize;
use recipe::{load_all_recipes, Engine};

mod cli;
mod model;
mod processor;
mod recipe;

fn main() -> anyhow::Result<()> {
let options = Options::parse();

match options.subcommand {
cli::SubCommand::Apply(Apply { approve }) => {
let recipe_root = canonicalize(options.recipe_root)?;

let recipes = load_all_recipes(&recipe_root)?;

let engine = Engine::new();

let outcomes = engine.run(approve, &recipes, &recipe_root)?;

for (key, value) in outcomes.inner {
println!("{}:", key.underline().bold());
println!();

for outcome in value {
match outcome {
model::Outcome::DryRun { block_id, message } => {
println!("⏸️ - {block_id}: {message}");
}
model::Outcome::Success { block_id, message } => {
println!("✅ - {block_id}: {message}");
}
model::Outcome::Failure { block_id, message } => {
println!("❌ - {block_id}: {message}");
}
}
}
}
}
}

Ok(())
}
13 changes: 0 additions & 13 deletions src/model/link.rs

This file was deleted.

67 changes: 0 additions & 67 deletions src/model/mod.rs

This file was deleted.

78 changes: 0 additions & 78 deletions src/model/outcome.rs

This file was deleted.

19 changes: 0 additions & 19 deletions src/model/recipe.rs

This file was deleted.

Loading

0 comments on commit 2efc3e0

Please sign in to comment.