Skip to content

Commit

Permalink
Version should inside
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo committed Feb 18, 2024
1 parent 13fc10b commit a073113
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 32 deletions.
2 changes: 1 addition & 1 deletion bin/oay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion bin/ofs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dev@opendal.apache.org>"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion bin/oli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions bindings/c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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"] }
4 changes: 2 additions & 2 deletions bindings/cpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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"
4 changes: 2 additions & 2 deletions bindings/dotnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dev@opendal.apache.org>"]
edition = "2021"
Expand All @@ -32,4 +32,4 @@ crate-type = ["cdylib"]
doc = false

[dependencies]
opendal = { path = "../../core" }
opendal = { version = "0.45.0", path = "../../core" }
2 changes: 1 addition & 1 deletion bindings/haskell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 4 additions & 2 deletions bindings/java/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions bindings/lua/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dev@opendal.apache.org>"]
edition = "2021"
Expand All @@ -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" }
6 changes: 4 additions & 2 deletions bindings/nodejs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion bindings/ocaml/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dev@opendal.apache.org>"]
edition = "2021"
Expand Down
4 changes: 2 additions & 2 deletions bindings/php/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dev@opendal.apache.org>"]
edition = "2021"
Expand All @@ -32,4 +32,4 @@ crate-type = ["cdylib"]

[dependencies]
ext-php-rs = "0.11.2"
opendal = { path = "../../core" }
opendal = { version = "0.45.0", path = "../../core" }
7 changes: 4 additions & 3 deletions bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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"
Expand All @@ -166,4 +168,3 @@ features = [
# Depend on "openssh" which depends on "tokio-pipe" that is unavailable on Windows.
"services-sftp",
]
path = "../../core"
2 changes: 1 addition & 1 deletion bindings/ruby/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dev@opendal.apache.org>"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion integrations/dav-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <dev@opendal.apache.org>"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion integrations/object_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 4 additions & 7 deletions scripts/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}"
)

0 comments on commit a073113

Please sign in to comment.