Populate clap with information from Cargo.toml

This commit is contained in:
Magnus Hoff 2017-11-01 11:44:49 +01:00
parent 551c4dc52b
commit 548555c45e
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,7 @@
[package] [package]
name = "sausagewiki" name = "sausagewiki"
version = "0.1.0" version = "0.1.0"
description = "A wiki engine"
authors = ["Magnus Hoff <maghoff@gmail.com>"] authors = ["Magnus Hoff <maghoff@gmail.com>"]
license = "GPL-3.0" license = "GPL-3.0"

View file

@ -45,8 +45,9 @@ const PORT: &str = "port";
fn args<'a>() -> clap::ArgMatches<'a> { fn args<'a>() -> clap::ArgMatches<'a> {
use clap::{App, Arg}; use clap::{App, Arg};
App::new("sausagewiki") App::new(env!("CARGO_PKG_NAME"))
.about("A wiki engine") .version(env!("CARGO_PKG_VERSION"))
.about(env!("CARGO_PKG_DESCRIPTION"))
.arg(Arg::with_name(DATABASE) .arg(Arg::with_name(DATABASE)
.help("Sets the database file to use") .help("Sets the database file to use")
.required(true)) .required(true))