use CARGO_PKG_VERSION for version
This commit is contained in:
@@ -18,7 +18,7 @@ where
|
|||||||
let subcommands = cmd::subcommands();
|
let subcommands = cmd::subcommands();
|
||||||
|
|
||||||
let mut app = App::new("TaskChampion")
|
let mut app = App::new("TaskChampion")
|
||||||
.version("0.1")
|
.version(env!("CARGO_PKG_VERSION"))
|
||||||
.about("Personal task-tracking")
|
.about("Personal task-tracking")
|
||||||
.setting(AppSettings::ColoredHelp);
|
.setting(AppSettings::ColoredHelp);
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ mod storage;
|
|||||||
|
|
||||||
#[get("/")]
|
#[get("/")]
|
||||||
async fn index() -> impl Responder {
|
async fn index() -> impl Responder {
|
||||||
// TODO: add version here
|
format!("TaskChampion sync server v{}", env!("CARGO_PKG_VERSION"))
|
||||||
"TaskChampion sync server"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return a scope defining the URL rules for this server, with access to
|
/// Return a scope defining the URL rules for this server, with access to
|
||||||
@@ -29,7 +28,7 @@ pub(crate) fn app_scope(server_state: ServerState) -> Scope {
|
|||||||
async fn main() -> Fallible<()> {
|
async fn main() -> Fallible<()> {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
let matches = clap::App::new("taskchampion-sync-server")
|
let matches = clap::App::new("taskchampion-sync-server")
|
||||||
.version("0.1.0")
|
.version(env!("CARGO_PKG_VERSION"))
|
||||||
.about("Server for TaskChampion")
|
.about("Server for TaskChampion")
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("port")
|
Arg::with_name("port")
|
||||||
|
|||||||
Reference in New Issue
Block a user