Skip to content

Commit df4f75c

Browse files
release v3.1.0 (fixed) (#1193)
1 parent 1bae6c7 commit df4f75c

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ once_cell = "1.19.0"
9090
log = { version = "0.4.17", optional = true }
9191
md-5 = "0.10.1"
9292
mongocrypt = { git = "https://github.com/mongodb/libmongocrypt-rust.git", branch = "main", optional = true, version = "0.2.0" }
93-
mongodb-internal-macros = { path = "macros", version = "3.0.0" }
93+
mongodb-internal-macros = { path = "macros", version = "3.1.0" }
9494
num_cpus = { version = "1.13.1", optional = true }
9595
openssl = { version = "0.10.38", optional = true }
9696
openssl-probe = { version = "0.1.5", optional = true }

etc/update_version/src/main.rs

+11-10
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ fn main() {
8080
let main_dir = self_dir.join("../../../..");
8181
std::env::set_current_dir(main_dir).unwrap();
8282

83+
let args: Args = argh::from_env();
84+
8385
let version_locs = vec![
8486
Location::new(
8587
"Cargo.toml",
@@ -103,24 +105,23 @@ fn main() {
103105
r#"html_root_url = "https://docs.rs/mongodb/(?<target>.*?)""#,
104106
),
105107
];
106-
let bson_version_loc = Location::new("Cargo.toml", r#"bson = (?<target>\{ git = .*? \})\n"#);
107-
let mongocrypt_version_loc =
108-
Location::new("Cargo.toml", r#"mongocrypt = (?<target>\{ git = .*? \})\n"#);
109-
110-
let args: Args = argh::from_env();
111-
112108
let mut pending = PendingUpdates::new();
113109
for loc in &version_locs {
114110
pending.apply(loc, &args.version);
115111
}
112+
116113
if let Some(bson) = args.bson {
117-
pending.apply(&bson_version_loc, &format!("{:?}", bson));
114+
let bson_version_loc =
115+
Location::new("Cargo.toml", r#"bson =.*version = "(?<target>.*?)".*"#);
116+
pending.apply(&bson_version_loc, &bson);
118117
}
118+
119119
if let Some(mongocrypt) = args.mongocrypt {
120-
pending.apply(
121-
&mongocrypt_version_loc,
122-
&format!("{{ version = {:?}, optional = true }}", mongocrypt),
120+
let mongocrypt_version_loc = Location::new(
121+
"Cargo.toml",
122+
r#"mongocrypt =.*version = "(?<target>.*?)".*"#,
123123
);
124+
pending.apply(&mongocrypt_version_loc, &mongocrypt);
124125
}
125126
pending.write();
126127
}

macros/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mongodb-internal-macros"
3-
version = "3.0.0"
3+
version = "3.1.0"
44
description = "Internal macros for the mongodb crate"
55
edition = "2021"
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)