Skip to content

Commit

Permalink
chore(rust): publish driver crates (#2480)
Browse files Browse the repository at this point in the history
Closes #2477.
  • Loading branch information
mbrobbel authored Jan 23, 2025
1 parent 1ad091e commit 6a7d501
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
6 changes: 5 additions & 1 deletion dev/release/post-08-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ main() {

pushd "${SOURCE_TOP_DIR}/rust"
cargo publish --all-features -p adbc_core
cargo publish --all-features -p adbc_datafusion
cargo publish --all-features -p adbc_snowflake
popd

echo "Success! The released Cargo crate is available here:"
echo "Success! The released Cargo crates are available here:"
echo " https://crates.io/crates/adbc_core"
echo " https://crates.io/crates/adbc_datafusion"
echo " https://crates.io/crates/adbc_snowflake"
}

main "$@"
5 changes: 4 additions & 1 deletion dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ update_versions() {
git add "${desc_file}"
done

sed -i.bak -E "s/^version = \".+\"/version = \"${rust_version}\"/" "${ADBC_DIR}/rust/Cargo.toml"
sed -i.bak -E \
-e "s/^version = \".+\"/version = \"${rust_version}\"/" \
-e "s/^adbc_core = { path = \".\/core\", version = \".+\"/adbc_core = { path = \".\/core\", version = \"${rust_version}\"/" \
"${ADBC_DIR}/rust/Cargo.toml"
rm "${ADBC_DIR}/rust/Cargo.toml.bak"
git add "${ADBC_DIR}/rust/Cargo.toml"

Expand Down
8 changes: 4 additions & 4 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ keywords = ["arrow"]
categories = ["database"]

[workspace.dependencies]
adbc_core = { path = "./core" }
adbc_core = { path = "./core", version = "0.17.0" }
arrow-array = { version = "53.4.0", default-features = false, features = [
"ffi",
] }
Expand Down
2 changes: 1 addition & 1 deletion rust/driver/datafusion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ keywords.workspace = true
categories.workspace = true

[dependencies]
adbc_core = { path = "../../core" }
adbc_core.workspace = true
arrow-array.workspace = true
arrow-buffer.workspace = true
arrow-schema.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion rust/driver/snowflake/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ env = ["dep:regex"]
dotenv = ["env", "dep:dotenvy"]

[dependencies]
adbc_core = { path = "../../core", features = ["driver_manager"] }
adbc_core = { workspace = true, features = ["driver_manager"] }
arrow-array.workspace = true
arrow-schema.workspace = true
dotenvy = { version = "0.15.7", default-features = false, optional = true }
Expand Down

0 comments on commit 6a7d501

Please sign in to comment.