-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into chore--update-merod-command-instructions
- Loading branch information
Showing
13 changed files
with
473 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ dist/ | |
lib/ | ||
node_modules/ | ||
certs/ | ||
output/* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use clap::{Parser, Subcommand}; | ||
use const_format::concatcp; | ||
use eyre::Result as EyreResult; | ||
use start::StartBootstrapCommand; | ||
|
||
use super::Environment; | ||
|
||
mod start; | ||
|
||
pub const EXAMPLES: &str = r" | ||
# Setup and run 2 nodes with demo app | ||
$ meroctl -- --node-name node1 bootstrap start --merod-path /path/to/merod | ||
# Setup and run 2 nodes with provided app | ||
$ meroctl -- --node-name node1 bootstrap start --merod-path /path/to/merod --app-path /path/to/app | ||
"; | ||
|
||
#[derive(Debug, Parser)] | ||
#[command(about = "Command for starting bootstrap")] | ||
#[command(after_help = concatcp!( | ||
"Examples:", | ||
EXAMPLES | ||
))] | ||
pub struct BootstrapCommand { | ||
#[command(subcommand)] | ||
pub subcommand: BootstrapSubCommands, | ||
} | ||
|
||
#[derive(Debug, Subcommand)] | ||
pub enum BootstrapSubCommands { | ||
Start(StartBootstrapCommand), | ||
} | ||
|
||
impl BootstrapCommand { | ||
pub async fn run(self, environment: &Environment) -> EyreResult<()> { | ||
match self.subcommand { | ||
BootstrapSubCommands::Start(generate) => generate.run(environment).await, | ||
} | ||
} | ||
} |
Oops, something went wrong.