Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -149,24 +149,24 @@ optional = true
default-features = false

[dependencies.bson2]
version = "2.15.0"
git = "https://github.com/mongodb/bson-rust"
branch = "2.15.x"
package = "bson"
version = "2.15.0"
optional = true

[dependencies.bson3]
version = "3.0.0"
git = "https://github.com/mongodb/bson-rust"
branch = "main"
package = "bson"
version = "3.0.0"
optional = true
features = ["serde"]

[dependencies.mongocrypt]
version = "0.3.1"
git = "https://github.com/mongodb/libmongocrypt-rust.git"
branch = "main"
version = "0.3.1"
default-features = false
optional = true

Expand Down
28 changes: 21 additions & 7 deletions etc/update_version/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,13 @@ struct Args {
#[argh(option)]
version: String,

/// version of the bson crate
/// version of the bson crate (2.x)
#[argh(option)]
bson: Option<String>,
bson2: Option<String>,

/// version of the bson crate (3.x)
#[argh(option)]
bson3: Option<String>,

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

if let Some(bson) = args.bson {
let bson_version_loc =
Location::new("Cargo.toml", r#"bson =.*version = "(?<target>.*?)".*"#);
pending.apply(&bson_version_loc, &bson);
if let Some(bson2) = args.bson2 {
let bson_version_loc = Location::new(
"Cargo.toml",
r#"\[dependencies.bson2\]\nversion = "(?<target>.*?)"\n"#,
);
pending.apply(&bson_version_loc, &bson2);
}

if let Some(bson3) = args.bson3 {
let bson_version_loc = Location::new(
"Cargo.toml",
r#"\[dependencies.bson3\]\nversion = "(?<target>.*?)"\n"#,
);
pending.apply(&bson_version_loc, &bson3);
}

if let Some(mongocrypt) = args.mongocrypt {
let mongocrypt_version_loc = Location::new(
"Cargo.toml",
r#"mongocrypt =.*version = "(?<target>.*?)".*"#,
r#"\[dependencies.mongocrypt\]\nversion = "(?<target>.*?)".*"#,
);
pending.apply(&mongocrypt_version_loc, &mongocrypt);
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub mod options;
pub use ::mongocrypt;

pub mod action;
pub mod atlas_search;
//pub mod atlas_search;
pub(crate) mod bson_compat;
mod bson_util;
pub mod change_stream;
Expand Down