From 1acf774c6d036ef79c0d652117c13ab8731c8478 Mon Sep 17 00:00:00 2001 From: HTHou Date: Mon, 15 Jun 2026 20:13:46 +0800 Subject: [PATCH] Keep thrift prebuilt artifacts under target --- .gitignore | 1 - iotdb-tools-thrift/README.md | 22 +++++++++++++--------- iotdb-tools-thrift/README_zh.md | 21 ++++++++++++--------- iotdb-tools-thrift/pom.xml | 2 +- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index bb3e9b2..dceb35b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,4 @@ **/.DS_Store derby-tsfile-db /iotdb-tools-thrift/target/ -/iotdb-tools-thrift/prebuilt-artifacts/ /iotdb-tools-thrift/.mvn/wrapper/maven-wrapper.jar diff --git a/iotdb-tools-thrift/README.md b/iotdb-tools-thrift/README.md index 00bf7f0..02f0cbe 100644 --- a/iotdb-tools-thrift/README.md +++ b/iotdb-tools-thrift/README.md @@ -58,14 +58,14 @@ The workflow verifies that each generated compiler reports the expected Apache Thrift version, and that Linux compilers are statically linked. The workflow uploads one bundled artifact named -`iotdb-tools-thrift-all-platforms`. Download and extract that artifact into this -directory: +`iotdb-tools-thrift-all-platforms`. Download and extract that artifact under +`target/` in this directory: - iotdb-tools-thrift/prebuilt-artifacts/ + iotdb-tools-thrift/target/prebuilt-artifacts/ If you use the GitHub CLI, run: - gh run download --name iotdb-tools-thrift-all-platforms --dir prebuilt-artifacts + gh run download --name iotdb-tools-thrift-all-platforms --dir target/prebuilt-artifacts The directory must contain these files: @@ -84,15 +84,19 @@ executable should report the expected Apache Thrift version. ## Deploy Prebuilt Artifacts to Nexus -Run the deploy locally from this directory. This signs and deploys the six -prebuilt platform artifacts from `prebuilt-artifacts/`: +Run the deploy locally from this directory after downloading the artifacts. This +signs and deploys the six prebuilt platform artifacts from +`target/prebuilt-artifacts/`: + + ./mvnw deploy -P apache-release,prebuilt-artifacts - ./mvnw clean deploy -P apache-release,prebuilt-artifacts +If you need a clean build, run `./mvnw clean` before downloading the prebuilt +artifacts because `clean` removes `target/`. Use `prebuilt.artifacts.dir` if the downloaded artifacts are in another directory: - ./mvnw clean deploy -P apache-release,prebuilt-artifacts -Dprebuilt.artifacts.dir=/path/to/prebuilt-artifacts + ./mvnw deploy -P apache-release,prebuilt-artifacts -Dprebuilt.artifacts.dir=/path/to/prebuilt-artifacts This creates a new staging repository in Nexus. After the deploy completes, open https://repository.apache.org/#stagingRepositories and verify the uploaded @@ -101,7 +105,7 @@ artifacts. If you need to re-run the local deploy into an existing staging repository, pass that exact staging repository id: - ./mvnw clean deploy -P apache-release,prebuilt-artifacts -DstagingRepositoryId=orgapacheiotdb-1234 + ./mvnw deploy -P apache-release,prebuilt-artifacts -DstagingRepositoryId=orgapacheiotdb-1234 The `stagingRepositoryId` value must be an existing Nexus staging repository id. Do not use a made-up id. diff --git a/iotdb-tools-thrift/README_zh.md b/iotdb-tools-thrift/README_zh.md index 3bdf09d..849ac6a 100644 --- a/iotdb-tools-thrift/README_zh.md +++ b/iotdb-tools-thrift/README_zh.md @@ -58,13 +58,13 @@ workflow 会验证每个平台生成的 compiler 是否输出预期的 Apache Th 并确认 Linux compiler 是静态链接的。 workflow 会上传一个名为 `iotdb-tools-thrift-all-platforms` 的汇总 artifact。 -下载并解压到当前模块的以下目录: +下载并解压到当前模块 `target/` 下的以下目录: - iotdb-tools-thrift/prebuilt-artifacts/ + iotdb-tools-thrift/target/prebuilt-artifacts/ 如果使用 GitHub CLI,可以执行: - gh run download --name iotdb-tools-thrift-all-platforms --dir prebuilt-artifacts + gh run download --name iotdb-tools-thrift-all-platforms --dir target/prebuilt-artifacts 该目录中必须包含以下文件: @@ -83,15 +83,18 @@ Thrift 版本符合预期。 ## 将预构建 artifacts 发布到 Nexus -在当前目录本地执行 deploy。该命令会对 `prebuilt-artifacts/` 下的六个平台 -artifacts 签名并 deploy: +下载 artifacts 后,在当前目录本地执行 deploy。该命令会对 +`target/prebuilt-artifacts/` 下的六个平台 artifacts 签名并 deploy: - ./mvnw clean deploy -P apache-release,prebuilt-artifacts + ./mvnw deploy -P apache-release,prebuilt-artifacts -如果下载目录不是默认的 `prebuilt-artifacts/`,可以通过 +如果需要 clean build,请先执行 `./mvnw clean`,再下载预构建 artifacts,因为 +`clean` 会删除 `target/`。 + +如果下载目录不是默认的 `target/prebuilt-artifacts/`,可以通过 `prebuilt.artifacts.dir` 指定: - ./mvnw clean deploy -P apache-release,prebuilt-artifacts -Dprebuilt.artifacts.dir=/path/to/prebuilt-artifacts + ./mvnw deploy -P apache-release,prebuilt-artifacts -Dprebuilt.artifacts.dir=/path/to/prebuilt-artifacts 这一步会在 Nexus 中创建新的 staging repository。deploy 完成后,打开 https://repository.apache.org/#stagingRepositories,检查上传的 artifacts。 @@ -99,7 +102,7 @@ https://repository.apache.org/#stagingRepositories,检查上传的 artifacts 如果需要重新 deploy 到已有 staging repository,请传入真实存在的 staging repository id: - ./mvnw clean deploy -P apache-release,prebuilt-artifacts -DstagingRepositoryId=orgapacheiotdb-1234 + ./mvnw deploy -P apache-release,prebuilt-artifacts -DstagingRepositoryId=orgapacheiotdb-1234 `stagingRepositoryId` 必须是 Nexus 里真实存在的 staging repository id,不能 随便填写一个不存在的 id。 diff --git a/iotdb-tools-thrift/pom.xml b/iotdb-tools-thrift/pom.xml index a4c6395..1200575 100644 --- a/iotdb-tools-thrift/pom.xml +++ b/iotdb-tools-thrift/pom.xml @@ -43,7 +43,7 @@ 0.23.0 Unix Makefiles Release - ${project.basedir}/prebuilt-artifacts + ${project.build.directory}/prebuilt-artifacts