use vergen to embed the git version info in the output

This commit is contained in:
Wez Furlong committed 2019-03-23 23:45:14 -07:00
1 parent c7739865f9
commit d80f58f7bc
3 files changed
+17 -4

No files matched your search

+6
View File
@@ -3,6 +3,10 @@ authors = ["Wez Furlong <wez@wezfurlong.org>"]
name = "wezterm"
version = "0.1.0"
edition = "2018"
build = "build.rs"
[build-dependencies]
vergen = "3"
[dependencies]
base91 = { path = "base91" }
@@ -86,6 +90,8 @@ force-fontconfig = ["fontconfig"]
[patch.crates-io]
# We need https://github.com/tomaka/glutin/pull/1099
glutin = { git = "https://github.com/yvt/glutin", branch="patch-macos-iscurrent" }
# This allows using the git tab in the help output
structopt-derive = { git = "https://github.com/wez/structopt", branch="vergen" }
[workspace]
+10
View File
@@ -0,0 +1,10 @@
use vergen::{generate_cargo_keys, ConstantsFlags};
fn main() {
// Setup the flags, toggling off the 'SEMVER_FROM_CARGO_PKG' flag
let mut flags = ConstantsFlags::all();
flags.toggle(ConstantsFlags::SEMVER_FROM_CARGO_PKG);
// Generate the 'cargo:' key output
generate_cargo_keys(ConstantsFlags::all()).expect("Unable to generate the cargo keys!");
}
+1 -4
View File
@@ -61,10 +61,7 @@ fn get_shell() -> Result<String, Error> {
// !=
#[derive(Debug, StructOpt)]
#[structopt(
name = "wezterm",
about = "Wez's Terminal Emulator\nhttp://github.com/wez/wezterm"
)]
#[structopt(about = "Wez's Terminal Emulator\nhttp://github.com/wez/wezterm")]
#[structopt(raw(setting = "structopt::clap::AppSettings::ColoredHelp"))]
struct Opt {
/// Skip loading ~/.wezterm.toml