Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Update purge and reset commands descriptions #160

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions modules/cli/cmd/devrunner/purge.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ import (
// purgeCmd represents the root purge command
var purgeCmd = &cobra.Command{
Use: "purge",
Short: "The root command for purging the local development instance data. Re-initializing is required after using a purge command.",
Long: `The root command for purging the local development instance data. Whenever a purge command is run, it will delete the specified data. Re-initializing is required after using a purge command.`,
Short: "The root command for deleting data and files for the local development instance.",
Long: "The root command for deleting data and files for the local development instance. Whenever a purge command is run, it will delete the specified data.",
}

// purgeBinariesCmd represents the 'purge binaries' command
var purgeBinariesCmd = &cobra.Command{
Use: "binaries",
Short: "Delete all binaries for a given instance. Re-initializing is required after using this command.",
Short: "Delete all locally downloaded service binaries for a given instance.",
Long: "Delete all locally downloaded service binaries for a given instance. Reinitializing is required after using this command to redownload the service binaries.",
Run: purgeBinariesCmdHandler,
}

Expand Down Expand Up @@ -52,8 +53,7 @@ func purgeBinariesCmdHandler(c *cobra.Command, _ []string) {
// purgeAllCmd represents the 'purge all' command
var purgeAllCmd = &cobra.Command{
Use: "all",
Short: "Delete all data for a given instance. Re-initializing is required after using this command.",
Long: "Delete all data for a given instance. This will remove all data, binaries, and configuration files for the specified instance. Re-initializing is required after using this command.",
Short: "Delete an instance. This includes chain state, configuration, and the service binaries for that instance.",
Run: purgeAllCmdHandler,
}

Expand Down Expand Up @@ -81,7 +81,8 @@ func purgeAllCmdHandler(c *cobra.Command, _ []string) {
// purgeLogsCmd represents the 'purge logs' command
var purgeLogsCmd = &cobra.Command{
Use: "logs",
Short: "Delete all logs for a given instance. Re-initializing is NOT required after using this command.",
Short: "Delete all logs for a given instance.",
Long: "Delete all logs for a given instance. Reinitializing is NOT required after using this command.",
Run: purgeLogsCmdHandler,
}

Expand All @@ -104,7 +105,6 @@ func purgeLogsCmdHandler(c *cobra.Command, _ []string) {
cmd.CreateDirOrPanic(logDir)

log.Infof("Successfully deleted logs for instance '%s'", instance)

}

func init() {
Expand Down
16 changes: 8 additions & 8 deletions modules/cli/cmd/devrunner/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import (
// resetCmd represents the root reset command
var resetCmd = &cobra.Command{
Use: "reset",
Short: "The root command for resetting the local development instance data. Re-initializing is not required after using a reset command.",
Long: `The root command for resetting the local development instance data. The specified data will be reset to its initial state as though initialization was just run. Re-initializing is not required after using a reset command.`,
Short: "The root command for resetting the local development instance data.",
Long: "The root command for resetting the local development instance data. The specified data will be reset to its initial state as though initialization was just run.",
}

// resetConfigCmd represents the 'reset config' command
var resetConfigCmd = &cobra.Command{
Use: "config",
Short: "Reset config files. Re-initializing is not required after using this command.",
Long: "Reset config files. This will return all files in the config directory to their default state as though initially created. Re-initializing is not required after using this command.",
Short: "Reset the base config files to their initial default state.",
Long: "Reset the base config files to their initial default state. This will return all files in the ~/.astria/<instance>/config directory to their default state as though initially created.",
Run: resetConfigCmdHandler,
}

Expand Down Expand Up @@ -70,8 +70,8 @@ func resetConfigCmdHandler(c *cobra.Command, _ []string) {
// resetNetworksCmd represents the 'reset networks' command
var resetNetworksCmd = &cobra.Command{
Use: "networks",
Short: "Reset the networks config. Re-initializing is not required after using this command.",
Long: `Reset the networks config for the cli. This command only resets the networks-config.toml file. No other config files are affected. Re-initializing is not required after using this command.`,
Short: "Reset the networks config to its default values.",
Long: "Reset the networks config to its default values. This command only resets the ~/.astria/<instance>/networks-config.toml file.",
Run: resetNetworksCmdHandler,
}

Expand Down Expand Up @@ -101,8 +101,8 @@ func resetNetworksCmdHandler(c *cobra.Command, _ []string) {
// resetStateCmd represents the 'reset state' command
var resetStateCmd = &cobra.Command{
Use: "state",
Short: "Reset Sequencer state. Re-initializing is not required after using this command.",
Long: "Reset Sequencer state. This will reset both the sequencer and Cometbft data to their initial state. Re-initializing is not required after using this command.",
Short: "Reset Sequencer chain state to its initial state.",
Long: "Reset Sequencer chain state to its initial state. This will reset both the Astria Sequencer and Cometbft chain state to their initial value.",
Run: resetStateCmdHandler,
}

Expand Down
Loading