Skip to content

Commit

Permalink
Merge pull request #13 from 06chaynes/develop
Browse files Browse the repository at this point in the history
fixes command name matching
  • Loading branch information
06chaynes authored Mar 1, 2024
2 parents d2b69ce + 6791efe commit 6d97c77
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 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.

2 changes: 1 addition & 1 deletion tfct/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tfct"
version = "0.2.0"
version = "0.2.1"
description = "A tool to help manage a toolset that helps manage your deployments"
authors = ["Christian Haynes <[email protected]>"]
repository = "https://github.com/06chaynes/tfc-toolset.git"
Expand Down
4 changes: 2 additions & 2 deletions tfct/src/cli/command/run/about.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pub(super) const STATUS: &str = "Get the status of a run.";
pub(super) const PLAN: &str = "Queue up plan only runs";
pub(super) const APPLY: &str = "Queue up plan and apply runs";
pub(super) const SPEC: &str = "Queue up speculative plan runs";
pub(super) const PLAN: &str = "Queue up plan and apply runs";
pub(super) const CREATE: &str = "Create a run.";
pub(super) const RUN_ID: &str = "The id of the run.";
pub(super) const MESSAGE: &str = "A message to include with the run";
Expand Down
10 changes: 5 additions & 5 deletions tfct/src/cli/command/run/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ pub(crate) struct Commands {
pub(crate) enum RunCmds {
#[clap(about = about::STATUS)]
Status(StatusArgs),
#[clap(about = about::SPEC)]
Spec(DefaultArgs),
#[clap(about = about::PLAN)]
Plan(DefaultArgs),
#[clap(about = about::APPLY)]
Apply(ApplyArgs),
Plan(PlanArgs),
}

#[derive(clap::Args, Debug)]
pub struct ApplyArgs {
pub struct PlanArgs {
#[clap(flatten)]
pub default: DefaultArgs,
#[arg(long, help = about::AUTO_APPLY, default_value = "false")]
Expand Down Expand Up @@ -101,7 +101,7 @@ fn override_queue_options(options: &mut QueueOptions, default: &DefaultArgs) {
}
}

fn set_apply_args(args: &mut Attributes, apply: &ApplyArgs) {
fn set_apply_args(args: &mut Attributes, apply: &PlanArgs) {
if let Some(auto_apply) = apply.auto_apply {
args.auto_apply = Some(auto_apply);
}
Expand Down
4 changes: 2 additions & 2 deletions tfct/src/cli/command/run/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
cli::{
command::common::{check_workspace_identifier, parse_workspace_file},
run::{
override_queue_options, set_apply_args, set_default_args, ApplyArgs,
override_queue_options, set_apply_args, set_default_args, PlanArgs,
},
},
error::ArgError,
Expand All @@ -19,7 +19,7 @@ use tfc_toolset::{
use tfc_toolset_extras::parse_workspace_name;

pub async fn plan(
args: &ApplyArgs,
args: &PlanArgs,
config: &Settings,
core: &Core,
client: Client,
Expand Down
4 changes: 2 additions & 2 deletions tfct/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ async fn main() -> miette::Result<()> {
RunCmds::Status(args) => {
run::status(args, &core, client.clone()).await?;
}
RunCmds::Plan(args) => {
RunCmds::Spec(args) => {
let config = Settings::new()
.into_diagnostic()
.wrap_err(SETTINGS_ERROR)?;
run::spec(args, &config, &core, client.clone()).await?;
}
RunCmds::Apply(args) => {
RunCmds::Plan(args) => {
let config = Settings::new()
.into_diagnostic()
.wrap_err(SETTINGS_ERROR)?;
Expand Down

0 comments on commit 6d97c77

Please sign in to comment.