diff --git a/docs/en/contribution/release-java-agent.md b/docs/en/contribution/release-java-agent.md index 5b941a822c..9555ac786a 100644 --- a/docs/en/contribution/release-java-agent.md +++ b/docs/en/contribution/release-java-agent.md @@ -76,6 +76,14 @@ Then run `gpgconf --kill gpg-agent` and `gpg --sign /dev/null` to cache it. 4. **upload** — upload to Apache SVN `dist/dev` (prompts for SVN credentials) 5. **email vote** — print vote email template with pre-filled version, commit ID, submodule commit, and checksums +Before the long build starts, **prepare** asks for the GitHub milestone ID of the next +development version, which it writes into the reset `CHANGES.md`. Look up the +`Java - ` milestone at https://github.com/apache/skywalking/milestones and +enter its number. The ID is checked against that milestone's title, and you are warned if +they disagree. Set `NEXT_MILESTONE=` to answer non-interactively; leave the prompt +blank to keep the `milestone/xxx` placeholder and edit it by hand before merging the +release PR. + Copy the generated email and send it to `dev@skywalking.apache.org`. Voting remains open for at least 72 hours. At least 3 (+1 binding) PMC votes with more +1 than -1 are required. ## Vote Check diff --git a/tools/releasing/release.sh b/tools/releasing/release.sh index 22c200dc46..92fe6fb68d 100755 --- a/tools/releasing/release.sh +++ b/tools/releasing/release.sh @@ -160,6 +160,40 @@ cmd_prepare() { echo " Tag: v${version}" echo " Next dev version: ${next_version}-SNAPSHOT" echo " Branch: ${branch_name}" + echo "" + + # At the end of this step CHANGES.md is reset for the next development + # version, and its milestone link needs that version's GitHub milestone ID. + # Ask for it here, up front, so the release does not stop for input after + # the long release:prepare build. Set NEXT_MILESTONE= to skip the prompt. + local next_milestone="${NEXT_MILESTONE:-}" + if [ -z "$next_milestone" ]; then + echo " CHANGES.md will be reset for ${next_version}, and its milestone link needs an ID." + echo " Find 'Java - ${next_version}' at https://github.com/apache/skywalking/milestones" + read -rp " Milestone ID for ${next_version} (number, or blank to fill in manually later): " next_milestone + fi + if [ -n "$next_milestone" ]; then + case "$next_milestone" in + *[!0-9]*) error "Milestone ID must be a number, got: ${next_milestone}" ;; + esac + # gh api writes the error body to stdout on failure, so gate on its + # exit status rather than letting a 404 payload become the title. + local milestone_title + if ! milestone_title=$(gh api "repos/apache/skywalking/milestones/${next_milestone}" -q .title 2>/dev/null); then + milestone_title="" + fi + if [ -z "$milestone_title" ]; then + warn " Could not verify milestone ${next_milestone} on apache/skywalking; using it as given." + elif [ "$milestone_title" != "Java - ${next_version}" ]; then + warn " Milestone ${next_milestone} is '${milestone_title}', expected 'Java - ${next_version}'. Double-check it." + else + info " Next milestone: ${next_milestone} (${milestone_title})" + fi + else + next_milestone="xxx" + warn " No milestone ID given; CHANGES.md will keep 'milestone/xxx' - edit it before merging the release PR." + fi + echo "" read -rp "Continue? [y/N] " confirm if [[ ! "$confirm" =~ ^[Yy]$ ]]; then @@ -208,7 +242,7 @@ ${next_version} ------------------ -All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/xxx?closed=1) +All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/${next_milestone}?closed=1) ------------------ Find change logs of all versions [here](changes).