@@ -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 }
0 commit comments