Skip to content

Commit

Permalink
release v3.1.0 (fixed) (#1193)
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelatkinson committed Aug 30, 2024
1 parent 1bae6c7 commit df4f75c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ once_cell = "1.19.0"
log = { version = "0.4.17", optional = true }
md-5 = "0.10.1"
mongocrypt = { git = "https://github.com/mongodb/libmongocrypt-rust.git", branch = "main", optional = true, version = "0.2.0" }
mongodb-internal-macros = { path = "macros", version = "3.0.0" }
mongodb-internal-macros = { path = "macros", version = "3.1.0" }
num_cpus = { version = "1.13.1", optional = true }
openssl = { version = "0.10.38", optional = true }
openssl-probe = { version = "0.1.5", optional = true }
Expand Down
21 changes: 11 additions & 10 deletions etc/update_version/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ fn main() {
let main_dir = self_dir.join("../../../..");
std::env::set_current_dir(main_dir).unwrap();

let args: Args = argh::from_env();

let version_locs = vec![
Location::new(
"Cargo.toml",
Expand All @@ -103,24 +105,23 @@ fn main() {
r#"html_root_url = "https://docs.rs/mongodb/(?<target>.*?)""#,
),
];
let bson_version_loc = Location::new("Cargo.toml", r#"bson = (?<target>\{ git = .*? \})\n"#);
let mongocrypt_version_loc =
Location::new("Cargo.toml", r#"mongocrypt = (?<target>\{ git = .*? \})\n"#);

let args: Args = argh::from_env();

let mut pending = PendingUpdates::new();
for loc in &version_locs {
pending.apply(loc, &args.version);
}

if let Some(bson) = args.bson {
pending.apply(&bson_version_loc, &format!("{:?}", bson));
let bson_version_loc =
Location::new("Cargo.toml", r#"bson =.*version = "(?<target>.*?)".*"#);
pending.apply(&bson_version_loc, &bson);
}

if let Some(mongocrypt) = args.mongocrypt {
pending.apply(
&mongocrypt_version_loc,
&format!("{{ version = {:?}, optional = true }}", mongocrypt),
let mongocrypt_version_loc = Location::new(
"Cargo.toml",
r#"mongocrypt =.*version = "(?<target>.*?)".*"#,
);
pending.apply(&mongocrypt_version_loc, &mongocrypt);
}
pending.write();
}
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mongodb-internal-macros"
version = "3.0.0"
version = "3.1.0"
description = "Internal macros for the mongodb crate"
edition = "2021"
license = "Apache-2.0"
Expand Down

0 comments on commit df4f75c

Please sign in to comment.