Skip to content

Commit 895f0c1

Browse files
authored
RUST-1205 Upstream changes from 3.0.x branch (#1128)
1 parent 5e6bead commit 895f0c1

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

.evergreen/release-build-vars.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ if [[ "${DRY_RUN:-}" == "yes" ]]; then
1818
fi
1919

2020
cat <<EOT >release-expansion.yml
21+
CARGO_REGISTRY_TOKEN: "${CARGO_REGISTRY_TOKEN}"
2122
CRATE_VERSION: "${CRATE_VERSION}"
2223
PAPERTRAIL_KEY_ID: "${PAPERTRAIL_KEY_ID}"
2324
PAPERTRAIL_SECRET_KEY: "${PAPERTRAIL_SECRET_KEY}"

.evergreen/release-danger-do-not-run-manually.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ set +x
1313

1414
set -o errexit
1515

16-
if [[ -z "$CRATES_IO_TOKEN" ]]; then
17-
echo >&2 "\$CRATES_IO_TOKEN must be set to the crates.io authentication token"
16+
if [[ -z "$CARGO_REGISTRY_TOKEN" ]]; then
17+
echo >&2 "\$CARGO_REGISTRY_TOKEN must be set to the crates.io authentication token"
1818
exit 1
1919
fi
2020

@@ -32,7 +32,7 @@ if [[ "${PACKAGE_ONLY}" == "yes" ]]; then
3232
cargo package --no-verify --allow-dirty
3333
else
3434
pushd macros
35-
cargo publish --token $CRATES_IO_TOKEN ${EXTRA}
35+
cargo publish ${EXTRA}
3636
popd
37-
cargo publish --token $CRATES_IO_TOKEN ${EXTRA}
37+
cargo publish ${EXTRA}
3838
fi

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ homepage = "https://www.mongodb.com/docs/drivers/rust/"
1616
license = "Apache-2.0"
1717
readme = "README.md"
1818
name = "mongodb"
19-
version = "2.8.0"
19+
version = "3.0.0-beta"
2020

2121
exclude = [
2222
"etc/**",
@@ -85,7 +85,7 @@ once_cell = "1.19.0"
8585
log = { version = "0.4.17", optional = true }
8686
md-5 = "0.10.1"
8787
mongocrypt = { git = "https://github.com/mongodb/libmongocrypt-rust.git", branch = "main", optional = true }
88-
mongodb-internal-macros = { path = "macros" }
88+
mongodb-internal-macros = { path = "macros", version = "3.0.0-beta" }
8989
num_cpus = { version = "1.13.1", optional = true }
9090
openssl = { version = "0.10.38", optional = true }
9191
openssl-probe = { version = "0.1.5", optional = true }

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The driver tests against Linux, MacOS, and Windows in CI.
1818
The driver is available on [crates.io](https://crates.io/crates/mongodb). To use the driver in your application, simply add it to your project's `Cargo.toml`.
1919
```toml
2020
[dependencies]
21-
mongodb = "2.8.0"
21+
mongodb = "3.0.0-beta"
2222
```
2323

2424
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.
@@ -27,7 +27,7 @@ Version 1 of this crate has reached end of life and will no longer be receiving
2727
The driver also provides a blocking sync API. To enable this, add the `"sync"` feature to your `Cargo.toml`:
2828
```toml
2929
[dependencies.mongodb]
30-
version = "2.8.0"
30+
version = "3.0.0-beta"
3131
features = ["sync"]
3232
```
3333
**Note:** The sync-specific types can be imported from `mongodb::sync` (e.g. `mongodb::sync::Client`).

etc/update_version/src/main.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ fn main() {
8585
"Cargo.toml",
8686
r#"name = "mongodb"\nversion = "(?<target>.*?)"\n"#,
8787
),
88+
Location::new(
89+
"Cargo.toml",
90+
r#"mongodb-internal-macros = \{ path = "macros", version = "(?<target>.*?)" \}\n"#,
91+
),
8892
Location::new(
8993
"macros/Cargo.toml",
9094
r#"name = "mongodb-internal-macros"\nversion = "(?<target>.*?)"\n"#,
@@ -99,10 +103,6 @@ fn main() {
99103
r#"html_root_url = "https://docs.rs/mongodb/(?<target>.*?)""#,
100104
),
101105
];
102-
let quote_version_loc = Location::new(
103-
"Cargo.toml",
104-
r#"mongodb-internal-macros = (?<target>\{ path = .* \})\n"#,
105-
);
106106
let bson_version_loc = Location::new("Cargo.toml", r#"bson = (?<target>\{ git = .*? \})\n"#);
107107
let mongocrypt_version_loc =
108108
Location::new("Cargo.toml", r#"mongocrypt = (?<target>\{ git = .*? \})\n"#);
@@ -113,7 +113,6 @@ fn main() {
113113
for loc in &version_locs {
114114
pending.apply(loc, &args.version);
115115
}
116-
pending.apply(&quote_version_loc, &format!("{:?}", args.version));
117116
if let Some(bson) = args.bson {
118117
pending.apply(&bson_version_loc, &format!("{:?}", bson));
119118
}

macros/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "mongodb-internal-macros"
3-
version = "2.8.0"
3+
description = "Internal macros for the mongodb crate"
4+
version = "3.0.0-beta"
45
edition = "2021"
56
license = "Apache-2.0"
67

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
)]
1313
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
1414
#![cfg_attr(test, type_length_limit = "80000000")]
15-
#![doc(html_root_url = "https://docs.rs/mongodb/2.8.0")]
15+
#![doc(html_root_url = "https://docs.rs/mongodb/3.0.0-beta")]
1616

1717
#[macro_use]
1818
pub mod options;

0 commit comments

Comments
 (0)