This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory.git
The following commit(s) were added to refs/heads/main by this push:
new d8090eecc chore(ci): use str replace to make bump java version faster
(#2568)
d8090eecc is described below
commit d8090eecc13daeeae35a911c4959aa9f767246b8
Author: Shawn Yang <[email protected]>
AuthorDate: Wed Sep 3 11:16:52 2025 +0800
chore(ci): use str replace to make bump java version faster (#2568)
<!--
**Thanks for contributing to Fory.**
**If this is your first time opening a PR on fory, you can refer to
[CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).**
Contribution Checklist
- The **Apache Fory** community has requirements on the naming of pr
titles. You can also find instructions in
[CONTRIBUTING.md](https://github.com/apache/fory/blob/main/CONTRIBUTING.md).
- Fory has a strong focus on performance. If the PR you submit will have
an impact on performance, please benchmark it first and provide the
benchmark result here.
-->
## Why?
<!-- Describe the purpose of this PR. -->
## What does this PR do?
<!-- Describe the details of this PR. -->
## Related issues
<!--
Is there any related issue? If this PR closes them you say say
fix/closes:
- #xxxx0
- #xxxx1
- Fixes #xxxx2
-->
## Does this PR introduce any user-facing change?
<!--
If any user-facing interface changes, please [open an
issue](https://github.com/apache/fory/issues/new/choose) describing the
need to do so and update the document if necessary.
Delete section if not applicable.
-->
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
## Benchmark
<!--
When the PR has an impact on performance (if you don't know whether the
PR will have an impact on performance, you can submit the PR first, and
if it will have impact on performance, the code reviewer will explain
it), be sure to attach a benchmark data here.
Delete section if not applicable.
-->
---
ci/release.py | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/ci/release.py b/ci/release.py
index 347cad0d8..90c7136b3 100644
--- a/ci/release.py
+++ b/ci/release.py
@@ -178,14 +178,21 @@ def bump_java_version(new_version):
"integration_tests/latest_jdk_tests",
"integration_tests/latest_jdk_tests",
"java/benchmark",
+ "java/fory-core",
+ "java/fory-format",
+ "java/fory-extensions",
+ "java/fory-test-core",
+ "java/fory-testsuite",
]:
_bump_version(p, "pom.xml", new_version, _update_pom_parent_version)
- os.chdir(os.path.join(PROJECT_ROOT_DIR, "java"))
- subprocess.check_output(
- f"mvn versions:set -DnewVersion={new_version}",
- shell=True,
- universal_newlines=True,
- )
+ # mvn versions:set too slow
+ # os.chdir(os.path.join(PROJECT_ROOT_DIR, "java"))
+ # subprocess.check_output(
+ # f"mvn versions:set -DnewVersion={new_version}",
+ # shell=True,
+ # universal_newlines=True,
+ # )
+ _bump_version("java", "pom.xml", new_version, _update_parent_pom_version)
def _update_pom_parent_version(lines, new_version):
@@ -216,9 +223,17 @@ def _update_scala_version(lines, v):
def _update_kotlin_version(lines, v):
+ return _update_pom_version(lines, v,
"<artifactId>fory-kotlin</artifactId>")
+
+
+def _update_parent_pom_version(lines, v):
+ return _update_pom_version(lines, v, "<packaging>pom</packaging>")
+
+
+def _update_pom_version(lines, v, prev):
target_index = -1
for index, line in enumerate(lines):
- if "<artifactId>fory-kotlin</artifactId>" in line:
+ if prev in line:
target_index = index + 1
break
current_version_line = lines[target_index]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]