feat: commit build field

This commit is contained in:
mrxiaozhuox committed 2022-08-18 15:54:42 -07:00
1 parent 6f4028f065
commit d9891d9f0c
9 files changed
+249 -248

No files matched your search

+14
View File
@@ -56,3 +56,17 @@ pub enum Commands {
#[clap(subcommand)]
Tool(tool::Tool),
}
impl Commands {
pub fn to_string(&self) -> String {
match self {
Commands::Build(_) => "build",
Commands::Translate(_) => "translate",
Commands::Serve(_) => "sevre",
Commands::Create(_) => "create",
Commands::Clean(_) => "clean",
Commands::Config(_) => "config",
Commands::Tool(_) => "tool",
}.to_string()
}
}