Skip to content

Commit

Permalink
Merge pull request #80 from dotxlem/alpha3-shave
Browse files Browse the repository at this point in the history
Yak shaving for v0.4.0-alpha.3
  • Loading branch information
dotxlem authored Jun 20, 2022
2 parents dc33f9a + 6fc1834 commit 3d96599
Show file tree
Hide file tree
Showing 15 changed files with 389 additions and 208 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions cli/src/commands/bind.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
use std::rc::Rc;

use clap::ArgMatches;

use crate::projectfs::Project;
use crate::terraform;
use crate::tools::kubectl::KubeCtl;
use crate::transpiler::Bindable;
use crate::transpiler::context::Context;
use crate::transpiler::toml;

pub fn command(matches: Option<&ArgMatches>) {
let _matches = match matches {
Some(matches) => matches,
_ => panic!("could not get matches for bind command"),
};

// Init the project structure -- panic if the project isn't in the current working dir
let cwd = std::env::current_dir().unwrap();
let mut manifest_path = cwd.clone();
manifest_path.push("assemblylift.toml");

let asml_manifest = toml::asml::Manifest::read(&manifest_path)
.expect("could not read assemblylift.toml");
let project = Rc::new(Project::new(asml_manifest.project.name.clone(), Some(cwd)));
let ctx = Rc::new(Context::from_project(project.clone(), asml_manifest)
.expect("could not make context from manifest"));
ctx.bind(ctx.clone()).unwrap();

// TODO terraform should be refactored around Tool trait
terraform::commands::init();
terraform::commands::apply();
Expand Down
1 change: 0 additions & 1 deletion cli/src/commands/cast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ pub fn command(matches: Option<&ArgMatches>) {
let asml_manifest = toml::asml::Manifest::read(&manifest_path)
.expect("could not read assemblylift.toml");
let project = Rc::new(Project::new(asml_manifest.project.name.clone(), Some(cwd)));
let project_path = project.dir().into_os_string().into_string().unwrap();

// Fetch the latest terraform binary to the project directory
terraform::fetch(&*project.dir());
Expand Down
Loading

0 comments on commit 3d96599

Please # to comment.