From 54a15f24f72a4e584ac82de01f2794a2b3849c55 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 12 Apr 2020 17:51:38 +0800 Subject: [PATCH] version 0.1.0 -> 1.0.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/config_util.rs | 3 +++ src/main.rs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fa2b96a..54828ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1050,7 +1050,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "oss-backupd" -version = "0.1.0" +version = "1.0.0" dependencies = [ "argparse 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 9a1f5bb..3126bd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oss-backupd" -version = "0.1.0" +version = "1.0.0" authors = ["Hatter Jiang "] edition = "2018" diff --git a/src/config_util.rs b/src/config_util.rs index 57850a5..238f308 100644 --- a/src/config_util.rs +++ b/src/config_util.rs @@ -11,6 +11,9 @@ use rust_util::{ }; use chrono::Utc; +pub const NAME: &str = "oss-backupd"; +pub const VERSION: &str = "1.0.0"; + pub const ETC_OSS_BACKUPD_CONFIG: &str = "/etc/oss-backupd/config.json"; pub const OSS_BACKUPD_CONFIG: &str = "oss-backupd-config.json"; pub const DOT_OSS_BACKUPD_CONFIG: &str = ".oss-backupd-config.json"; diff --git a/src/main.rs b/src/main.rs index d836d7f..289eef8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,7 @@ use opt::Options; fn main() -> XResult<()> { let options = Options::new_and_parse_args()?; if options.version { - print_message(MessageType::INFO, "ossbackupd v0.1.0"); + print_message(MessageType::INFO, &format!("{} v{}", config_util::NAME, config_util::VERSION)); return Ok(()); }