Skip to content

Commit

Permalink
Upgrade to vergen 8.3, move to git describe --dirty --tags for semver (
Browse files Browse the repository at this point in the history
…#1543)

* Upgrade to vergen 8.3, move to git describe --dirty --tags for semver

* Add newline to build.rs
  • Loading branch information
ikmckenz authored Feb 4, 2024
1 parent 4a758f7 commit 140dc6d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 53 deletions.
66 changes: 21 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion swap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ testcontainers = "0.12"

[build-dependencies]
anyhow = "1"
vergen = { version = "7.5", default-features = false, features = [ "git", "build" ] }
vergen = { version = "8.3", default-features = false, features = [ "build", "git", "git2" ] }
10 changes: 5 additions & 5 deletions swap/build.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use anyhow::Result;
use vergen::{vergen, Config, SemverKind};
use vergen::EmitBuilder;

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

vergen(config)
EmitBuilder::builder()
.git_describe(true, true, None)
.emit()?;
Ok(())
}
2 changes: 1 addition & 1 deletion swap/src/asb/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ pub enum Command {
name = "asb",
about = "Automated Swap Backend for swapping XMR for BTC",
author,
version = env!("VERGEN_GIT_SEMVER_LIGHTWEIGHT")
version = env!("VERGEN_GIT_DESCRIBE")
)]
pub struct RawArguments {
#[structopt(long, help = "Swap on testnet")]
Expand Down
2 changes: 1 addition & 1 deletion swap/src/cli/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ pub enum Command {
name = "swap",
about = "CLI for swapping BTC for XMR",
author,
version = env!("VERGEN_GIT_SEMVER_LIGHTWEIGHT")
version = env!("VERGEN_GIT_DESCRIBE")
)]
struct RawArguments {
// global is necessary to ensure that clap can match against testnet in subcommands
Expand Down

0 comments on commit 140dc6d

Please sign in to comment.