You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2026/04/01 04:58:52 UTC
(skywalking) branch 10.4.0-release updated: Improve release script: GPG pre-check, build error surfacing, checkstyle skip, gh pr create
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch 10.4.0-release
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/10.4.0-release by this push:
new 35eaca7302 Improve release script: GPG pre-check, build error surfacing, checkstyle skip, gh pr create
35eaca7302 is described below
commit 35eaca7302692a6179cee4665f4ba15c0a24589e
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Wed Apr 1 12:58:46 2026 +0800
Improve release script: GPG pre-check, build error surfacing, checkstyle skip, gh pr create
Co-Authored-By: Claude Opus 4.6 (1M context) <no...@anthropic.com>
---
docs/en/guides/How-to-release.md | 9 +++++----
tools/releasing/release.sh | 37 ++++++++++++++++++++++++++++++++-----
2 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/docs/en/guides/How-to-release.md b/docs/en/guides/How-to-release.md
index 3f6edf15d0..307aa85658 100644
--- a/docs/en/guides/How-to-release.md
+++ b/docs/en/guides/How-to-release.md
@@ -12,13 +12,13 @@ Add your GPG public key into the [SkyWalking GPG KEYS](https://dist.apache.org/r
The release script [`tools/releasing/release.sh`](https://github.com/apache/skywalking/blob/master/tools/releasing/release.sh) automates the following steps:
-1. Verify GPG signer (`@apache.org` email required)
-2. Check required tools (`gpg`, `svn`, `shasum`, `git`, `yq`)
+1. Verify GPG signer (`@apache.org` email required) and test GPG signing upfront
+2. Check required tools (`gpg`, `svn`, `shasum`, `git`, `yq`, `gh`)
3. Detect current version from `pom.xml`
4. Calculate release version (strip `-SNAPSHOT`) and next version (bump minor)
5. Clone the repository, build source and binary tarballs, GPG sign, SHA512 checksum
6. Upload artifacts to SVN staging (`https://dist.apache.org/repos/dist/dev/skywalking/{version}`)
-7. Generate the vote email (with sha512 checksums and submodule commit IDs filled in)
+7. Generate the vote email (with sha512 checksums, submodule commit IDs, and release tag link filled in)
8. Prepare next version PR (bump version, rotate changelog, update `menu.yml`, push branch)
```bash
@@ -27,6 +27,8 @@ bash release.sh
```
The script is interactive — it confirms the GPG signer and version numbers before proceeding.
+The GPG signing is verified before the build starts, so passphrase or agent issues are caught early.
+If the Maven build fails, the last 30 lines of the build log are printed for diagnosis.
After the script completes, copy the generated vote email and send it to `dev@skywalking.apache.org`.
@@ -45,7 +47,6 @@ are found in `https://dist.apache.org/repos/dist/dev/skywalking/x.y.z` with `.as
1. Build a distribution package from the source code package (`apache-skywalking-x.y.z-src.tar.gz`) by following this [doc](https://github.com/apache/skywalking/blob/master/docs/en/guides/How-to-build.md#build-from-apache-source-code-release).
1. Check the Apache License Header. Run `docker run --rm -v $(pwd):/github/workspace apache/skywalking-eyes header check`. (No binaries in source codes)
-
The voting process is as follows:
1. All PMC member votes are +1 binding, and all other votes are +1 but non-binding.
1. If you obtain at least 3 (+1 binding) votes with more +1 than -1 votes within 72 hours, the release will be approved.
diff --git a/tools/releasing/release.sh b/tools/releasing/release.sh
index e1568d1976..b1d75462e3 100755
--- a/tools/releasing/release.sh
+++ b/tools/releasing/release.sh
@@ -79,7 +79,14 @@ build_release_artifacts() {
log_file=$(mktemp)
echo "Building the release binary artifacts, log file: ${log_file}"
- ${MVN} install package -DskipTests > ${log_file} 2>&1
+ if ! ${MVN} install package -DskipTests -Dcheckstyle.skip > ${log_file} 2>&1; then
+ echo ""
+ echo "ERROR: Maven build failed. Last 30 lines of log:"
+ tail -30 "${log_file}"
+ echo ""
+ echo "Full log: ${log_file}"
+ exit 1
+ fi
mv dist/${PRODUCT_NAME}-bin.tar.gz "${SCRIPT_DIR}"/${PRODUCT_NAME}-${RELEASE_VERSION}-bin.tar.gz
cd "${SCRIPT_DIR}"
@@ -124,8 +131,10 @@ prepare_next_version() {
echo "Pushing the changes to the remote repository..."
git push --set-upstream origin ${RELEASE_VERSION}-release
- echo "Opening the PR..."
- open https://github.com/apache/skywalking/pull/new/${RELEASE_VERSION}-release
+ echo "Creating the PR..."
+ gh pr create --title "Prepare for next release ${NEXT_RELEASE_VERSION}" \
+ --body "Update version to ${NEXT_RELEASE_VERSION}-SNAPSHOT and rotate changelog for ${RELEASE_VERSION} release." \
+ --base master
}
upload_to_svn() {
@@ -189,7 +198,7 @@ This is a call for vote to release Apache SkyWalking version ${RELEASE_VERSION}.
Release notes:
- * https://github.com/apache/skywalking/blob/master/docs/en/changes/changes-${RELEASE_VERSION}.md
+ * https://github.com/apache/skywalking/blob/${TAG}/docs/en/changes/changes.md
Release Candidate:
@@ -261,12 +270,30 @@ if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then
exit 1
fi
+# Ensure GPG can prompt for passphrase in the current terminal
+export GPG_TTY=$(tty)
+
+echo "Verifying GPG signing works (you may be prompted for your passphrase)..."
+TEST_FILE=$(mktemp)
+echo "test" > "${TEST_FILE}"
+if ! gpg --armor --detach-sig "${TEST_FILE}" 2>/dev/null; then
+ rm -f "${TEST_FILE}" "${TEST_FILE}.asc"
+ echo ""
+ echo "ERROR: GPG signing failed. Common fixes:"
+ echo " 1. Run 'export GPG_TTY=\$(tty)' and retry"
+ echo " 2. Start gpg-agent: 'gpgconf --launch gpg-agent'"
+ echo " 3. Pre-cache passphrase: 'echo test | gpg --clearsign > /dev/null'"
+ exit 1
+fi
+rm -f "${TEST_FILE}" "${TEST_FILE}.asc"
+echo "GPG signing verified successfully."
+
# Step 2: Check required tools
echo ""
echo "=== Step 2: Checking required tools ==="
MISSING_TOOLS=()
-for tool in gpg svn shasum git yq; do
+for tool in gpg svn shasum git yq gh; do
if ! command -v "$tool" &>/dev/null; then
MISSING_TOOLS+=("$tool")
fi