From a0731133feafb01da2c3a4f28ae9f55b6373b08b Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Sun, 18 Feb 2024 19:51:02 +0800 Subject: [PATCH] Version should inside Signed-off-by: Xuanwo --- bin/oay/Cargo.toml | 2 +- bin/ofs/Cargo.toml | 2 +- bin/oli/Cargo.toml | 2 +- bindings/c/Cargo.toml | 6 ++++-- bindings/cpp/Cargo.toml | 4 ++-- bindings/dotnet/Cargo.toml | 4 ++-- bindings/haskell/Cargo.toml | 2 +- bindings/java/Cargo.toml | 6 ++++-- bindings/lua/Cargo.toml | 4 ++-- bindings/nodejs/Cargo.toml | 6 ++++-- bindings/ocaml/Cargo.toml | 2 +- bindings/php/Cargo.toml | 4 ++-- bindings/python/Cargo.toml | 7 ++++--- bindings/ruby/Cargo.toml | 2 +- integrations/dav-server/Cargo.toml | 2 +- integrations/object_store/Cargo.toml | 2 +- scripts/constants.py | 11 ++++------- 17 files changed, 36 insertions(+), 32 deletions(-) diff --git a/bin/oay/Cargo.toml b/bin/oay/Cargo.toml index 276bd247da0..f95b78e5606 100644 --- a/bin/oay/Cargo.toml +++ b/bin/oay/Cargo.toml @@ -27,7 +27,7 @@ homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.67" -version = "0.41.0" +version = "0.41.0+core.0.45.0" [features] default = ["frontends-webdav", "frontends-s3"] diff --git a/bin/ofs/Cargo.toml b/bin/ofs/Cargo.toml index 83d1b62e1a4..ad45a661791 100644 --- a/bin/ofs/Cargo.toml +++ b/bin/ofs/Cargo.toml @@ -20,7 +20,7 @@ categories = ["filesystem"] description = "OpenDAL File System" keywords = ["storage", "data", "s3", "fs", "azblob"] name = "ofs" -version = "0.0.1" +version = "0.0.1+core.0.45.0" authors = ["Apache OpenDAL "] edition = "2021" diff --git a/bin/oli/Cargo.toml b/bin/oli/Cargo.toml index 54934b77287..75cecc0bbdb 100644 --- a/bin/oli/Cargo.toml +++ b/bin/oli/Cargo.toml @@ -27,7 +27,7 @@ homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.67" -version = "0.41.0" +version = "0.41.0+core.0.45.0" [features] # Enable services dashmap support diff --git a/bindings/c/Cargo.toml b/bindings/c/Cargo.toml index ab30cfd2b01..16c5027cc3c 100644 --- a/bindings/c/Cargo.toml +++ b/bindings/c/Cargo.toml @@ -25,7 +25,7 @@ homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.67" -version = "0.44.2" +version = "0.44.2+core.0.45.0" [lib] crate-type = ["cdylib", "staticlib"] @@ -37,5 +37,7 @@ cbindgen = "0.26.0" [dependencies] bytes = "1.4.0" once_cell = "1.17.1" -opendal = { path = "../../core", features = ["layers-blocking"] } +opendal = { version = "0.45", path = "../../core", features = [ + "layers-blocking", +] } tokio = { version = "1.27", features = ["fs", "macros", "rt-multi-thread"] } diff --git a/bindings/cpp/Cargo.toml b/bindings/cpp/Cargo.toml index 81a98e79c71..6f9bc113dbd 100644 --- a/bindings/cpp/Cargo.toml +++ b/bindings/cpp/Cargo.toml @@ -25,7 +25,7 @@ homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.67" -version = "0.44.2" +version = "0.44.2+core.0.45.0" [lib] crate-type = ["staticlib"] @@ -34,7 +34,7 @@ crate-type = ["staticlib"] anyhow = "1.0" chrono = "0.4" cxx = "1.0" -opendal = { path = "../../core" } +opendal = { version = "0.45.0", path = "../../core" } [build-dependencies] cxx-build = "1.0" diff --git a/bindings/dotnet/Cargo.toml b/bindings/dotnet/Cargo.toml index 70068031ed7..499b64c8090 100644 --- a/bindings/dotnet/Cargo.toml +++ b/bindings/dotnet/Cargo.toml @@ -18,7 +18,7 @@ [package] name = "opendal-dotnet" publish = false -version = "0.1.0" +version = "0.1.0+core.0.45.0" authors = ["Apache OpenDAL "] edition = "2021" @@ -32,4 +32,4 @@ crate-type = ["cdylib"] doc = false [dependencies] -opendal = { path = "../../core" } +opendal = { version = "0.45.0", path = "../../core" } diff --git a/bindings/haskell/Cargo.toml b/bindings/haskell/Cargo.toml index cc2cd2a2bed..de1fe047706 100644 --- a/bindings/haskell/Cargo.toml +++ b/bindings/haskell/Cargo.toml @@ -25,7 +25,7 @@ homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.67" -version = "0.44.2" +version = "0.44.2+core.0.44.2" [lib] crate-type = ["cdylib"] diff --git a/bindings/java/Cargo.toml b/bindings/java/Cargo.toml index 0d40d9ac692..b9f9d3a3c50 100644 --- a/bindings/java/Cargo.toml +++ b/bindings/java/Cargo.toml @@ -25,7 +25,7 @@ homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.67" -version = "0.45.0" +version = "0.45.0+core.0.45.0" [lib] crate-type = ["cdylib"] @@ -156,7 +156,9 @@ anyhow = "1.0.71" jni = "0.21.1" num_cpus = "1.15.0" once_cell = "1.19.0" -opendal = { path = "../../core", features = ["layers-blocking"] } +opendal = { version = "0.45.0", path = "../../core", features = [ + "layers-blocking", +] } tokio = { version = "1.28.1", features = ["full"] } # This is not optimal. See also the Cargo issue: diff --git a/bindings/lua/Cargo.toml b/bindings/lua/Cargo.toml index f95b9165bf1..30df2543bd5 100644 --- a/bindings/lua/Cargo.toml +++ b/bindings/lua/Cargo.toml @@ -18,7 +18,7 @@ [package] name = "opendal-lua" publish = false -version = "0.1.0" +version = "0.1.0+core.0.45.0" authors = ["Apache OpenDAL "] edition = "2021" @@ -39,4 +39,4 @@ mlua = { version = "0.9", features = [ "module", "macros", ], default-features = false, optional = true } -opendal = { path = "../../core" } +opendal = { version = "0.45.0", path = "../../core" } diff --git a/bindings/nodejs/Cargo.toml b/bindings/nodejs/Cargo.toml index fa62a54fa88..3524ddfd3ff 100644 --- a/bindings/nodejs/Cargo.toml +++ b/bindings/nodejs/Cargo.toml @@ -25,7 +25,7 @@ homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.67" -version = "0.45.0" +version = "0.45.0+core.0.45.0" [features] default = [ @@ -157,7 +157,9 @@ napi = { version = "2.11.3", default-features = false, features = [ "async", ] } napi-derive = "2.14.6" -opendal = { path = "../../core", features = ["layers-blocking"] } +opendal = { version = "0.45.0", path = "../../core", features = [ + "layers-blocking", +] } tokio = "1" [build-dependencies] diff --git a/bindings/ocaml/Cargo.toml b/bindings/ocaml/Cargo.toml index f7529ca575e..f3505d2e41c 100644 --- a/bindings/ocaml/Cargo.toml +++ b/bindings/ocaml/Cargo.toml @@ -18,7 +18,7 @@ [package] name = "opendal-ocaml" publish = false -version = "0.0.0" +version = "0.0.0+core.0.44.2" authors = ["Apache OpenDAL "] edition = "2021" diff --git a/bindings/php/Cargo.toml b/bindings/php/Cargo.toml index 3ad2a50849e..ab7bf15f65f 100644 --- a/bindings/php/Cargo.toml +++ b/bindings/php/Cargo.toml @@ -18,7 +18,7 @@ [package] name = "opendal-php" publish = false -version = "0.1.0" +version = "0.1.0+core.0.45.0" authors = ["Apache OpenDAL "] edition = "2021" @@ -32,4 +32,4 @@ crate-type = ["cdylib"] [dependencies] ext-php-rs = "0.11.2" -opendal = { path = "../../core" } +opendal = { version = "0.45.0", path = "../../core" } diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index be91112310f..1bd2cf8280b 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -25,7 +25,7 @@ homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.67" -version = "0.45.0" +version = "0.45.0+core.0.45.0" [features] default = [ @@ -154,7 +154,9 @@ doc = false [dependencies] futures = "0.3.28" -opendal = { path = "../../core", features = ["layers-blocking"] } +opendal = { version = "0.45.0", path = "../../core", features = [ + "layers-blocking", +] } pyo3 = "0.20.1" pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"] } tokio = "1" @@ -166,4 +168,3 @@ features = [ # Depend on "openssh" which depends on "tokio-pipe" that is unavailable on Windows. "services-sftp", ] -path = "../../core" diff --git a/bindings/ruby/Cargo.toml b/bindings/ruby/Cargo.toml index d28d1203990..5572f3f8671 100644 --- a/bindings/ruby/Cargo.toml +++ b/bindings/ruby/Cargo.toml @@ -18,7 +18,7 @@ [package] name = "opendal-ruby" publish = false -version = "0.1.0" +version = "0.1.0+core.0.43.0" authors = ["Apache OpenDAL "] edition = "2021" diff --git a/integrations/dav-server/Cargo.toml b/integrations/dav-server/Cargo.toml index 535f20ec78a..1c8623c20ad 100644 --- a/integrations/dav-server/Cargo.toml +++ b/integrations/dav-server/Cargo.toml @@ -18,7 +18,7 @@ [package] description = "Use OpenDAL as a backend to access data in various service with WebDAV protocol" name = "dav-server-opendalfs" -version = "0.0.0" +version = "0.0.0+core.0.45.0" authors = ["Apache OpenDAL "] edition = "2021" diff --git a/integrations/object_store/Cargo.toml b/integrations/object_store/Cargo.toml index 9d3facf18e5..5ad892ee53d 100644 --- a/integrations/object_store/Cargo.toml +++ b/integrations/object_store/Cargo.toml @@ -25,7 +25,7 @@ homepage = "https://opendal.apache.org/" license = "Apache-2.0" repository = "https://github.com/apache/opendal" rust-version = "1.67" -version = "0.42.0" +version = "0.42.0+core.0.45.0" [dependencies] async-trait = "0.1" diff --git a/scripts/constants.py b/scripts/constants.py index 261b20b506e..11818229b27 100755 --- a/scripts/constants.py +++ b/scripts/constants.py @@ -62,29 +62,26 @@ def get_rust_package_version(path): # For examples: # core: `0.45.0` # packages depends on core: `0.1.0+core.0.45.0` -# packages depends on bindings/c: `0.1.0+bindings_c.0.1.0` def get_package_version(package): if package == "core": return get_rust_package_version("core") # NOTE: for now, all dependence package must be rust package. - dependence = get_package_dependence(package) - dependence_version = get_rust_package_version(dependence) + core_version = get_rust_package_version("core") cargo_toml = ROOT_DIR / package / "Cargo.toml" # cargo_toml exists, we can get the version from Cargo.toml. if cargo_toml.exists(): - package_version = get_rust_package_version(package) - return f"{package_version}+{dependence.replace('/', '_')}.{dependence_version}" + return get_rust_package_version(package) # cargo_toml not exists, we should handle case by case ideally. # # However, those packages are not mature enough, it's much easier for us to always return `0.0.0` instead. - return f"0.0.0+{dependence.replace('/', '_')}.{dependence_version}" + return f"0.0.0+core.{core_version}" if __name__ == "__main__": for v in PACKAGES: print( - f"{v}: depends={get_package_dependence(v)}, version={get_package_version(v)}" + f"{v}: version={get_package_version(v)}" )