update verison
This commit is contained in:
parent
07fce376c8
commit
5068420359
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -100,7 +100,7 @@ checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bp"
|
name = "bp"
|
||||||
version = "0.1.0"
|
version = "2.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"inquire",
|
"inquire",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "bp"
|
name = "bp"
|
||||||
version = "0.1.0"
|
version = "2.0.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
13
src/main.rs
13
src/main.rs
@ -4,24 +4,21 @@ use tokio;
|
|||||||
use clap::{Parser, Subcommand};
|
use clap::{Parser, Subcommand};
|
||||||
use crate::git::{handle_git, GitCommand};
|
use crate::git::{handle_git, GitCommand};
|
||||||
|
|
||||||
const VERSION: &str = "2.0";
|
|
||||||
|
|
||||||
#[derive(Subcommand)]
|
#[derive(Subcommand)]
|
||||||
enum Command {
|
enum Command {
|
||||||
/// Various commands for creating and adding git repos to breadpi.
|
/// Various commands for creating and adding git repos to breadpi.
|
||||||
Git {
|
Git {
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
git_command: GitCommand
|
git_command: GitCommand
|
||||||
},
|
}
|
||||||
|
|
||||||
V
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
|
#[command(version, about, long_about = None)]
|
||||||
struct Cli {
|
struct Cli {
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
command: Command
|
command: Command,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
@ -32,9 +29,5 @@ async fn main() {
|
|||||||
Command::Git { git_command } => {
|
Command::Git { git_command } => {
|
||||||
handle_git(&git_command).await;
|
handle_git(&git_command).await;
|
||||||
},
|
},
|
||||||
|
|
||||||
Command::V => {
|
|
||||||
println!("breadpi-client {VERSION}")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user