From 57ab686f128026ab3102a66da43d9925aef47ba7 Mon Sep 17 00:00:00 2001 From: Zachary Dremann Date: Tue, 2 Jul 2024 19:31:49 -0400 Subject: [PATCH] Match the croaring-sys version with the version of CRoaring --- .gitignore | 3 ++- Cargo.lock | 2 +- Makefile | 8 +++++++- croaring-sys/Cargo.toml | 2 +- croaring/Cargo.toml | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 1b58012..cde9a2b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ target .DS_Store .idea -/README.md.tmp \ No newline at end of file +README.md.tmp +Cargo.toml.tmp \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 9be2878..a6ceecc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -186,7 +186,7 @@ dependencies = [ [[package]] name = "croaring-sys" -version = "3.0.0" +version = "4.0.0" dependencies = [ "cc", ] diff --git a/Makefile b/Makefile index 40814cc..0f0e0c8 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ test: croaring_release_url_base = https://github.com/RoaringBitmap/CRoaring/releases/download # Fetch the c source amalgamation from a tagged CRoaring release (like `make version=0.9.3 update_croaring`) -update_croaring: download_croaring bindgen update_readme_croaring_version +update_croaring: download_croaring bindgen update_readme_croaring_version update_croaring_sys_version download_croaring: rm -f '$(croaring_source)/roaring.c' '$(croaring_source)/roaring.h' '$(croaring_source)/roaring.hh' @@ -42,6 +42,12 @@ update_readme_croaring_version: @sed -r -e 's_\[CRoaring version `[0-9]+\.[0-9]+\.[0-9]+`\]\([^\)]+\)_[CRoaring version `$(version)`](https://github.com/RoaringBitmap/CRoaring/releases/tag/v$(version))_' README.md > README.md.tmp @mv README.md.tmp README.md +# We don't always want to update the version of croaring-sys dependency in croaring, but we always want to update croaring-sys +update_croaring_sys_version: + @echo "Updating croaring-sys version in Cargo.toml to $(version)" + @sed -r -e 's/^version = ".*"/version = "$(version)"/' croaring-sys/Cargo.toml > croaring-sys/Cargo.toml.tmp + @mv croaring-sys/Cargo.toml.tmp croaring-sys/Cargo.toml + # Build a c program to (re)generate the example serialized files for testing test_serialization_files: cd croaring/tests/data/ && \ diff --git a/croaring-sys/Cargo.toml b/croaring-sys/Cargo.toml index 769f2a0..a4e3456 100644 --- a/croaring-sys/Cargo.toml +++ b/croaring-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "croaring-sys" -version = "3.0.0" +version = "4.0.0" edition = "2021" authors = ["croaring-rs developers"] license = "Apache-2.0" diff --git a/croaring/Cargo.toml b/croaring/Cargo.toml index d81916c..dec269e 100644 --- a/croaring/Cargo.toml +++ b/croaring/Cargo.toml @@ -25,7 +25,7 @@ roaring = "0.10" criterion = { version = "0.5", features = ["html_reports"] } [dependencies] -ffi = { package = "croaring-sys", path = "../croaring-sys", version = "3.0.0" } +ffi = { package = "croaring-sys", path = "../croaring-sys", version = "4.0.0" } [[bench]] name = "benches"