Skip to content

Commit

Permalink
scaffold pop install
Browse files Browse the repository at this point in the history
  • Loading branch information
weezy20 committed May 1, 2024
1 parent f21d6f2 commit 6f8ef5a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions crates/pop-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ duct.workspace = true
tempfile.workspace = true
url.workspace = true
tokio.workspace = true
reqwest.workspace = true

# pop-cli
clap.workspace = true
Expand Down
1 change: 1 addition & 0 deletions crates/pop-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ pub(crate) mod call;
pub(crate) mod new;
pub(crate) mod test;
pub(crate) mod up;
pub(crate) mod install;
28 changes: 16 additions & 12 deletions crates/pop-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,44 @@ enum Commands {
#[clap(alias = "t")]
#[cfg(feature = "contract")]
Test(commands::test::TestArgs),
/// Install tools for Substrate development
#[clap(alias = "i")]
Install(commands::install::InstallArgs)
}

#[tokio::main]
async fn main() -> Result<()> {
let cli = Cli::parse();
match cli.command {
Commands::New(args) => Ok(match &args.command {
Commands::New(args) => match &args.command {
#[cfg(feature = "parachain")]
commands::new::NewCommands::Parachain(cmd) => cmd.execute().await?,
commands::new::NewCommands::Parachain(cmd) => cmd.execute().await,
#[cfg(feature = "parachain")]
commands::new::NewCommands::Pallet(cmd) => cmd.execute().await?,
commands::new::NewCommands::Pallet(cmd) => cmd.execute().await,
#[cfg(feature = "contract")]
commands::new::NewCommands::Contract(cmd) => cmd.execute().await?,
}),
commands::new::NewCommands::Contract(cmd) => cmd.execute().await,
},
Commands::Build(args) => match &args.command {
#[cfg(feature = "parachain")]
commands::build::BuildCommands::Parachain(cmd) => cmd.execute(),
#[cfg(feature = "contract")]
commands::build::BuildCommands::Contract(cmd) => cmd.execute(),
},
#[cfg(feature = "contract")]
Commands::Call(args) => Ok(match &args.command {
commands::call::CallCommands::Contract(cmd) => cmd.execute().await?,
}),
Commands::Up(args) => Ok(match &args.command {
Commands::Call(args) => match &args.command {
commands::call::CallCommands::Contract(cmd) => cmd.execute().await,
},
Commands::Up(args) => match &args.command {
#[cfg(feature = "parachain")]
commands::up::UpCommands::Parachain(cmd) => cmd.execute().await?,
commands::up::UpCommands::Parachain(cmd) => cmd.execute().await,
#[cfg(feature = "contract")]
commands::up::UpCommands::Contract(cmd) => cmd.execute().await?,
}),
commands::up::UpCommands::Contract(cmd) => cmd.execute().await,
},
#[cfg(feature = "contract")]
Commands::Test(args) => match &args.command {
commands::test::TestCommands::Contract(cmd) => cmd.execute(),
},
Commands::Install(args) => args.execute().await,
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/pop-parachains/src/up.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use zombienet_sdk::{Network, NetworkConfig, NetworkConfigExt};
use zombienet_support::fs::local::LocalFileSystem;

const POLKADOT_SDK: &str = "https://github.com/paritytech/polkadot-sdk";
const POLKADOT_DEFAULT_VERSION: &str = "v1.10.0";
const POLKADOT_DEFAULT_VERSION: &str = "v1.11.0";

pub struct Zombienet {
/// The cache location, used for caching binaries.
Expand Down

0 comments on commit 6f8ef5a

Please sign in to comment.