diff --git a/scripts/constants.py b/scripts/constants.py index edd16c44f80..de66cc62f02 100755 --- a/scripts/constants.py +++ b/scripts/constants.py @@ -61,7 +61,7 @@ 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 core: `0.1.0` def get_package_version(package): if package == "core": return get_rust_package_version("core") @@ -78,10 +78,3 @@ def get_package_version(package): # # 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" - - -if __name__ == "__main__": - for v in PACKAGES: - print( - f"{v}: version={get_package_version(v)}" - ) diff --git a/scripts/dependencies.py b/scripts/dependencies.py index 48a6f285f16..6e517b44741 100755 --- a/scripts/dependencies.py +++ b/scripts/dependencies.py @@ -21,6 +21,7 @@ import subprocess from constants import PACKAGES + def check_deps(): cargo_dirs = PACKAGES for root in cargo_dirs: @@ -50,18 +51,16 @@ def generate_deps(): subparsers = parser.add_subparsers() parser_check = subparsers.add_parser( - 'check', - description="Check dependencies", - help="Check dependencies") + "check", description="Check dependencies", help="Check dependencies" + ) parser_check.set_defaults(func=check_deps) parser_generate = subparsers.add_parser( - 'generate', - description="Generate dependencies", - help="Generate dependencies") + "generate", description="Generate dependencies", help="Generate dependencies" + ) parser_generate.set_defaults(func=generate_deps) args = parser.parse_args() arg_dict = dict(vars(args)) - del arg_dict['func'] + del arg_dict["func"] args.func(**arg_dict) diff --git a/scripts/merge_local_staging.py b/scripts/merge_local_staging.py index b63a215b489..e60f9c0db5f 100644 --- a/scripts/merge_local_staging.py +++ b/scripts/merge_local_staging.py @@ -53,7 +53,7 @@ def print_directory_contents(directory, prefix=""): def print_index_contents(directory): - for sub_dir in directory.rglob('.index'): + for sub_dir in directory.rglob(".index"): with sub_dir.open("r") as file: print(file.read()) diff --git a/scripts/release.py b/scripts/release.py index 7341b685100..767357617e7 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -84,7 +84,13 @@ def generate_checksum(): for i in Path(ROOT_DIR / "dist").glob("*.tar.gz"): print(f"Check checksum for {i}") subprocess.run( - ["shasum", "-a", "512", "-c", f"{str(i.relative_to(ROOT_DIR / 'dist'))}.sha512"], + [ + "shasum", + "-a", + "512", + "-c", + f"{str(i.relative_to(ROOT_DIR / 'dist'))}.sha512", + ], cwd=ROOT_DIR / "dist", check=True, ) diff --git a/scripts/verify.py b/scripts/verify.py index ac2ff73c485..6620ce98061 100755 --- a/scripts/verify.py +++ b/scripts/verify.py @@ -146,7 +146,9 @@ def build_java_binding(dir): print( "Cargo is not found, please check if rust development has been setup correctly" ) - print("Visit https://www.rust-lang.org/tools/install for more information") + print( + "Visit https://www.rust-lang.org/tools/install for more information" + ) sys.exit(1) if "java" in dir.name: diff --git a/scripts/version.py b/scripts/version.py new file mode 100755 index 00000000000..fde8f54b912 --- /dev/null +++ b/scripts/version.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python3 +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +from constants import PACKAGES, get_package_version + + +def increment_patch_version(version): + parts = version.split(".") + parts[-1] = str(int(parts[-1]) + 1) + return ".".join(parts) + + +if __name__ == "__main__": + print(f"| {'Name':<25} | {'Version':<7} | {'Next':<7} |") + print(f"| {'-':<25} | {'-':<7} | {'-':<7} |") + for v in PACKAGES: + cur = get_package_version(v) + next = increment_patch_version(cur) + + print(f"| {str(v):<25} | {cur:<7} | {next:<7} |") diff --git a/website/community/release/release.md b/website/community/release/release.md index 4b3c51e3e33..545f812e62f 100644 --- a/website/community/release/release.md +++ b/website/community/release/release.md @@ -86,10 +86,14 @@ This issue is used to track tasks of the opendal ${opendal_version} release. ### Blockers -> Blockers are the tasks that must be completed before the release. + ### Build Release +#### Relelase List + + + #### GitHub Side - [ ] Bump version in project @@ -122,6 +126,17 @@ This issue is used to track tasks of the opendal ${opendal_version} release. For details of each step, please refer to: https://opendal.apache.org/community/release/ ``` +## Release List + +Use `./script/version.py` to generate a release version list for review. + +This list bumps `patch` version by default, please adapt with the actual needs. + +For example: + +- If breaking change happened, we need to bump `minor` version instead of `patch`. +- If this package is not ready for release, we can skip it. + ## GitHub Side ### Bump version in project