Skip to content

Commit 1a1f304

Browse files
authored
RUST-2142 Pre-3.0 release tooling update (#1467)
1 parent 53fea85 commit 1a1f304

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,24 +149,24 @@ optional = true
149149
default-features = false
150150

151151
[dependencies.bson2]
152+
version = "2.15.0"
152153
git = "https://github.com/mongodb/bson-rust"
153154
branch = "2.15.x"
154155
package = "bson"
155-
version = "2.15.0"
156156
optional = true
157157

158158
[dependencies.bson3]
159+
version = "3.0.0"
159160
git = "https://github.com/mongodb/bson-rust"
160161
branch = "main"
161162
package = "bson"
162-
version = "3.0.0"
163163
optional = true
164164
features = ["serde"]
165165

166166
[dependencies.mongocrypt]
167+
version = "0.3.1"
167168
git = "https://github.com/mongodb/libmongocrypt-rust.git"
168169
branch = "main"
169-
version = "0.3.1"
170170
default-features = false
171171
optional = true
172172

etc/update_version/src/main.rs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,13 @@ struct Args {
6464
#[argh(option)]
6565
version: String,
6666

67-
/// version of the bson crate
67+
/// version of the bson crate (2.x)
6868
#[argh(option)]
69-
bson: Option<String>,
69+
bson2: Option<String>,
70+
71+
/// version of the bson crate (3.x)
72+
#[argh(option)]
73+
bson3: Option<String>,
7074

7175
/// version of the mongocrypt crate
7276
#[argh(option)]
@@ -110,16 +114,26 @@ fn main() {
110114
pending.apply(loc, &args.version);
111115
}
112116

113-
if let Some(bson) = args.bson {
114-
let bson_version_loc =
115-
Location::new("Cargo.toml", r#"bson =.*version = "(?<target>.*?)".*"#);
116-
pending.apply(&bson_version_loc, &bson);
117+
if let Some(bson2) = args.bson2 {
118+
let bson_version_loc = Location::new(
119+
"Cargo.toml",
120+
r#"\[dependencies.bson2\]\nversion = "(?<target>.*?)"\n"#,
121+
);
122+
pending.apply(&bson_version_loc, &bson2);
123+
}
124+
125+
if let Some(bson3) = args.bson3 {
126+
let bson_version_loc = Location::new(
127+
"Cargo.toml",
128+
r#"\[dependencies.bson3\]\nversion = "(?<target>.*?)"\n"#,
129+
);
130+
pending.apply(&bson_version_loc, &bson3);
117131
}
118132

119133
if let Some(mongocrypt) = args.mongocrypt {
120134
let mongocrypt_version_loc = Location::new(
121135
"Cargo.toml",
122-
r#"mongocrypt =.*version = "(?<target>.*?)".*"#,
136+
r#"\[dependencies.mongocrypt\]\nversion = "(?<target>.*?)".*"#,
123137
);
124138
pending.apply(&mongocrypt_version_loc, &mongocrypt);
125139
}

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pub mod options;
2121
pub use ::mongocrypt;
2222

2323
pub mod action;
24-
pub mod atlas_search;
24+
//pub mod atlas_search;
2525
pub(crate) mod bson_compat;
2626
mod bson_util;
2727
pub mod change_stream;

0 commit comments

Comments
 (0)