diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 152e736..0fe9d05 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -2,7 +2,7 @@ use anyhow::Result; use clap::{Parser, Subcommand}; use slog::{o, Drain, Level}; -mod get; +mod version; #[derive(Debug, Parser)] #[clap( @@ -20,7 +20,7 @@ pub struct RootCommand { #[derive(Debug, Subcommand)] pub enum RootSubcommands { /// Calculates the version based on the current commits. - Get(get::GetCommand), + Version(version::VersionCommand), } impl RootCommand { @@ -44,7 +44,7 @@ impl RootCommand { // Pass the command in. match &self.command { - RootSubcommands::Get(cmd) => cmd.run(log).await?, + RootSubcommands::Version(cmd) => cmd.run(log).await?, }; Ok(()) diff --git a/src/commands/get.rs b/src/commands/version.rs similarity index 99% rename from src/commands/get.rs rename to src/commands/version.rs index c8a6d6e..c0cd145 100644 --- a/src/commands/get.rs +++ b/src/commands/version.rs @@ -11,7 +11,7 @@ use std::str::FromStr; /// Gets the current version based on commits. #[derive(Debug, Parser)] -pub struct GetCommand {} +pub struct VersionCommand {} #[derive(Debug, Clone, PartialOrd, PartialEq)] enum VersionBump { @@ -21,7 +21,7 @@ enum VersionBump { Major = 3, } -impl GetCommand { +impl VersionCommand { pub async fn run(&self, log: slog::Logger) -> Result<()> { // Figure out the path we are loading. let current_dir =