Skip to content

Commit f432941

Browse files
release v3.4.0 (#1534)
1 parent f022600 commit f432941

File tree

8 files changed

+84
-29
lines changed

8 files changed

+84
-29
lines changed

Cargo.lock

Lines changed: 53 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
resolver = "2"
3-
members = ["driver", "macros", "benchmarks"]
3+
members = ["driver", "macros", "benchmarks", "etc/update_version"]
44

55
[workspace.package]
66
authors = [
@@ -14,4 +14,4 @@ authors = [
1414
license = "Apache-2.0"
1515
edition = "2021"
1616
repository = "https://github.com/mongodb/mongo-rust-driver"
17-
rust-version = "1.83"
17+
rust-version = "1.83"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The driver is available on [crates.io](https://crates.io/crates/mongodb). To use
2323

2424
```toml
2525
[dependencies]
26-
mongodb = "3.3.0"
26+
mongodb = "3.4.0"
2727
```
2828

2929
Version 1 of this crate has reached end of life and will no longer be receiving any updates or bug fixes, so all users are recommended to always depend on the latest 2.x release. See the [2.0.0 release notes](https://github.com/mongodb/mongo-rust-driver/releases/tag/v2.0.0) for migration information if upgrading from a 1.x version.
@@ -34,7 +34,7 @@ The driver also provides a blocking sync API. To enable this, add the `"sync"` f
3434

3535
```toml
3636
[dependencies.mongodb]
37-
version = "3.3.0"
37+
version = "3.4.0"
3838
features = ["sync"]
3939
```
4040

driver/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ categories = ["asynchronous", "database", "web-programming"]
55
homepage = "https://www.mongodb.com/docs/drivers/rust/"
66
readme = "../README.md"
77
name = "mongodb"
8-
version = "3.3.0"
8+
version = "3.4.0"
99

1010
authors.workspace = true
1111
license.workspace = true
@@ -97,7 +97,7 @@ hickory-resolver = { version = "0.25", optional = true }
9797
hmac = "0.12.1"
9898
log = { version = "0.4.17", optional = true }
9999
md-5 = "0.10.1"
100-
mongodb-internal-macros = { path = "../macros", version = "3.3.0" }
100+
mongodb-internal-macros = { path = "../macros", version = "3.4.0" }
101101
num_cpus = { version = "1.13.1", optional = true }
102102
openssl = { version = "0.10.38", optional = true }
103103
openssl-probe = { version = "0.1.5", optional = true }
@@ -164,7 +164,7 @@ optional = true
164164
features = ["serde"]
165165

166166
[dependencies.mongocrypt]
167-
version = "0.3.1"
167+
version = "0.3.2"
168168
git = "https://github.com/mongodb/libmongocrypt-rust.git"
169169
branch = "main"
170170
default-features = false

driver/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
)]
1616
#![cfg_attr(docsrs, feature(doc_cfg))]
1717
#![cfg_attr(test, type_length_limit = "80000000")]
18-
#![doc(html_root_url = "https://docs.rs/mongodb/3.3.0")]
18+
#![doc(html_root_url = "https://docs.rs/mongodb/3.4.0")]
1919

2020
#[macro_use]
2121
pub mod options;

etc/update_version/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
[package]
22
name = "update_version"
33
version = "0.1.0"
4-
edition = "2021"
4+
5+
authors.workspace = true
6+
license.workspace = true
7+
edition.workspace = true
8+
repository.workspace = true
9+
rust-version.workspace = true
510

611
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
712

etc/update_version/src/main.rs

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ impl PendingUpdates {
2929
}
3030

3131
fn apply(&mut self, location: &Location, update: &str) {
32-
let text = self
33-
.files
34-
.entry(location.path)
35-
.or_insert_with(|| std::fs::read_to_string(location.path).unwrap());
32+
let text = self.files.entry(location.path).or_insert_with(|| {
33+
std::fs::read_to_string(location.path).expect(
34+
std::path::absolute(location.path)
35+
.unwrap()
36+
.to_str()
37+
.unwrap(),
38+
)
39+
});
3640

3741
if !location.pattern.is_match(text) {
3842
panic!("no match for {:?}", location);
@@ -81,19 +85,19 @@ fn main() {
8185
// nosemgrep: current-exe
8286
let zero = std::env::current_exe().unwrap();
8387
let self_dir = zero.parent().unwrap();
84-
let main_dir = self_dir.join("../../../..");
88+
let main_dir = self_dir.join("..").join("..");
8589
std::env::set_current_dir(main_dir).unwrap();
8690

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

8993
let version_locs = vec![
9094
Location::new(
91-
"Cargo.toml",
95+
"driver/Cargo.toml",
9296
r#"name = "mongodb"\nversion = "(?<target>.*?)"\n"#,
9397
),
9498
Location::new(
95-
"Cargo.toml",
96-
r#"mongodb-internal-macros = \{ path = "macros", version = "(?<target>.*?)" \}\n"#,
99+
"driver/Cargo.toml",
100+
r#"mongodb-internal-macros = \{ path = "../macros", version = "(?<target>.*?)" \}\n"#,
97101
),
98102
Location::new(
99103
"macros/Cargo.toml",
@@ -105,7 +109,7 @@ fn main() {
105109
r#"\[dependencies.mongodb\]\nversion = "(?<target>.*?)"\n"#,
106110
),
107111
Location::new(
108-
"src/lib.rs",
112+
"driver/src/lib.rs",
109113
r#"html_root_url = "https://docs.rs/mongodb/(?<target>.*?)""#,
110114
),
111115
];
@@ -116,23 +120,23 @@ fn main() {
116120

117121
if let Some(bson2) = args.bson2 {
118122
let bson_version_loc = Location::new(
119-
"Cargo.toml",
123+
"driver/Cargo.toml",
120124
r#"\[dependencies.bson2\]\nversion = "(?<target>.*?)"\n"#,
121125
);
122126
pending.apply(&bson_version_loc, &bson2);
123127
}
124128

125129
if let Some(bson3) = args.bson3 {
126130
let bson_version_loc = Location::new(
127-
"Cargo.toml",
131+
"driver/Cargo.toml",
128132
r#"\[dependencies.bson3\]\nversion = "(?<target>.*?)"\n"#,
129133
);
130134
pending.apply(&bson_version_loc, &bson3);
131135
}
132136

133137
if let Some(mongocrypt) = args.mongocrypt {
134138
let mongocrypt_version_loc = Location::new(
135-
"Cargo.toml",
139+
"driver/Cargo.toml",
136140
r#"\[dependencies.mongocrypt\]\nversion = "(?<target>.*?)".*"#,
137141
);
138142
pending.apply(&mongocrypt_version_loc, &mongocrypt);

macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mongodb-internal-macros"
3-
version = "3.3.0"
3+
version = "3.4.0"
44
description = "Internal macros for the mongodb crate"
55

66
authors.workspace = true

0 commit comments

Comments
 (0)