Skip to content

Commit

Permalink
Remove deprecated config command (#1305)
Browse files Browse the repository at this point in the history
* Remove deprecated config command

* update docs
  • Loading branch information
leighmcculloch authored May 1, 2024
1 parent 1c08651 commit 88e3b46
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 373 deletions.
22 changes: 1 addition & 21 deletions cmd/soroban-cli/src/commands/config/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use clap::{arg, command, Parser};
use clap::{arg, command};
use serde::{Deserialize, Serialize};

use crate::Pwd;
Expand All @@ -12,16 +12,6 @@ use super::{keys, network};
pub mod locator;
pub mod secret;

#[derive(Debug, Parser)]
pub enum Cmd {
/// Configure different networks. Depraecated, use `soroban network` instead.
#[command(subcommand)]
Network(network::Cmd),
/// Identity management. Deprecated, use `soroban keys` instead.
#[command(subcommand)]
Identity(keys::Cmd),
}

#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error(transparent)]
Expand All @@ -34,16 +24,6 @@ pub enum Error {
Config(#[from] locator::Error),
}

impl Cmd {
pub async fn run(&self) -> Result<(), Error> {
match &self {
Cmd::Identity(identity) => identity.run().await?,
Cmd::Network(network) => network.run().await?,
}
Ok(())
}
}

#[derive(Debug, clap::Args, Clone, Default)]
#[group(skip)]
pub struct Args {
Expand Down
6 changes: 0 additions & 6 deletions cmd/soroban-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ impl Root {
Cmd::Network(network) => network.run().await?,
Cmd::Version(version) => version.run(),
Cmd::Keys(id) => id.run().await?,
Cmd::Config(c) => c.run().await?,
};
Ok(())
}
Expand All @@ -118,9 +117,6 @@ pub enum Cmd {
/// Print shell completion code for the specified shell.
#[command(long_about = completion::LONG_ABOUT)]
Completion(completion::Cmd),
/// Deprecated, use `soroban keys` and `soroban network` instead
#[command(subcommand)]
Config(config::Cmd),
/// Tools for smart contract developers
#[command(subcommand)]
Contract(contract::Cmd),
Expand Down Expand Up @@ -151,8 +147,6 @@ pub enum Error {
#[error(transparent)]
Lab(#[from] lab::Error),
#[error(transparent)]
Config(#[from] config::Error),
#[error(transparent)]
Clap(#[from] clap::error::Error),
#[error(transparent)]
Plugin(#[from] plugin::Error),
Expand Down
Loading

0 comments on commit 88e3b46

Please sign in to comment.