xmr-btc-swap/swap/build.rs
Thomas Eizinger 714514edbc
Provide a commit-specific version output
For builds made directly on the tag, the output of `--version` will
not change. For builds not made on a tagged commit, the output will
look something like this:

```
> swap --version

swap 0.7.0-117-g93161f9
```

Fixes #409.
2021-07-07 17:55:13 +10:00

10 lines
218 B
Rust

use anyhow::Result;
use vergen::{vergen, Config, SemverKind};
fn main() -> Result<()> {
let mut config = Config::default();
*config.git_mut().semver_kind_mut() = SemverKind::Lightweight;
vergen(config)
}