This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 32c40d1d chore(bin/oli): Set oli version from package version (#1786)
32c40d1d is described below

commit 32c40d1dbe53fd49b7c81b456c033bb6413f33f5
Author: Suyan <[email protected]>
AuthorDate: Tue Mar 28 16:45:03 2023 +0800

    chore(bin/oli): Set oli version from package version (#1786)
    
    chore(bin/oli): use package version as oli version
    
    Signed-off-by: suyanhanx <[email protected]>
---
 bin/oli/src/commands/cat.rs  | 2 +-
 bin/oli/src/commands/cli.rs  | 2 +-
 bin/oli/src/commands/cp.rs   | 2 +-
 bin/oli/src/commands/ls.rs   | 2 +-
 bin/oli/src/commands/rm.rs   | 2 +-
 bin/oli/src/commands/stat.rs | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/bin/oli/src/commands/cat.rs b/bin/oli/src/commands/cat.rs
index bbe3d07a..61701a9c 100644
--- a/bin/oli/src/commands/cat.rs
+++ b/bin/oli/src/commands/cat.rs
@@ -41,7 +41,7 @@ pub async fn main(args: &ArgMatches) -> Result<()> {
 }
 
 pub fn cli(cmd: Command) -> Command {
-    cmd.version("0.10.0")
+    cmd.version(env!("CARGO_PKG_VERSION"))
         .about("display object content")
         .arg(Arg::new("target").required(true))
 }
diff --git a/bin/oli/src/commands/cli.rs b/bin/oli/src/commands/cli.rs
index 0eb2da48..248c4e24 100644
--- a/bin/oli/src/commands/cli.rs
+++ b/bin/oli/src/commands/cli.rs
@@ -34,7 +34,7 @@ pub async fn main(args: &ArgMatches) -> Result<()> {
 }
 
 pub fn cli(cmd: Command) -> Command {
-    cmd.version("0.10.0")
+    cmd.version(env!("CARGO_PKG_VERSION"))
         .about("OpenDAL Command Line Interface")
         .subcommand(super::cat::cli(Command::new("cat")))
         .subcommand(super::cp::cli(Command::new("cp")))
diff --git a/bin/oli/src/commands/cp.rs b/bin/oli/src/commands/cp.rs
index c990a669..fc9c99ed 100644
--- a/bin/oli/src/commands/cp.rs
+++ b/bin/oli/src/commands/cp.rs
@@ -52,7 +52,7 @@ pub async fn main(args: &ArgMatches) -> Result<()> {
 }
 
 pub fn cli(cmd: Command) -> Command {
-    cmd.version("0.10.0")
+    cmd.version(env!("CARGO_PKG_VERSION"))
         .about("copy")
         .arg(Arg::new("source").required(true))
         .arg(Arg::new("destination").required(true))
diff --git a/bin/oli/src/commands/ls.rs b/bin/oli/src/commands/ls.rs
index db6d1d69..450d14dc 100644
--- a/bin/oli/src/commands/ls.rs
+++ b/bin/oli/src/commands/ls.rs
@@ -52,7 +52,7 @@ pub async fn main(args: &ArgMatches) -> Result<()> {
 }
 
 pub fn cli(cmd: Command) -> Command {
-    cmd.version("0.10.0")
+    cmd.version(env!("CARGO_PKG_VERSION"))
         .about("ls")
         .arg(Arg::new("target").required(true))
         .arg(
diff --git a/bin/oli/src/commands/rm.rs b/bin/oli/src/commands/rm.rs
index d4855557..a31b4b27 100644
--- a/bin/oli/src/commands/rm.rs
+++ b/bin/oli/src/commands/rm.rs
@@ -47,7 +47,7 @@ pub async fn main(args: &ArgMatches) -> Result<()> {
 }
 
 pub fn cli(cmd: Command) -> Command {
-    cmd.version("0.10.0")
+    cmd.version(env!("CARGO_PKG_VERSION"))
         .about("remove object")
         .arg(Arg::new("target").required(true))
         .arg(
diff --git a/bin/oli/src/commands/stat.rs b/bin/oli/src/commands/stat.rs
index 09ed32e8..f83b16f1 100644
--- a/bin/oli/src/commands/stat.rs
+++ b/bin/oli/src/commands/stat.rs
@@ -53,7 +53,7 @@ pub async fn main(args: &ArgMatches) -> Result<()> {
 }
 
 pub fn cli(cmd: Command) -> Command {
-    cmd.version("0.10.0")
+    cmd.version(env!("CARGO_PKG_VERSION"))
         .about("show object metadata")
         .arg(Arg::new("target").required(true))
 }

Reply via email to