You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "nateab (via GitHub)" <gi...@apache.org> on 2026/02/14 01:05:28 UTC
[PR] Add release automation scripts (Phase A) [flink]
nateab opened a new pull request, #27608:
URL: https://github.com/apache/flink/pull/27608
## Summary
Adds 7 new shell scripts to `tools/releasing/` that automate the manual gaps in the Apache Flink release process. These are Layer 1 (gap-filling scripts) of a proposed layered release automation approach.
- **`preflight_check.sh`** — Validates GPG keys, Maven/Nexus config, Java version, CLI tools, and PyPI credentials before starting a release
- **`jira_ops.sh`** — Wraps JIRA REST API for blockers, release notes, version create/release
- **`nexus_ops.sh`** — Wraps Apache Nexus 2 REST API for staging repo list/close/release/drop (eliminates web UI dependency)
- **`dist_ops.sh`** — Wraps SVN operations on dist.apache.org for staging, promoting, and cleaning up release artifacts
- **`generate_email.sh`** — Generates pre-filled email templates for vote, vote-result, and announcement emails
- **`pyflink_ops.sh`** — Automates GitHub Actions trigger/wait/download for PyFlink wheel builds
- **`update_all_versions.sh`** — Handles FlinkVersion enum updates and shows cross-repo tasks for major releases
All scripts follow existing `tools/releasing/` conventions (ASF headers, `set -o errexit/nounset/pipefail`, `tools/` dir check, backtick substitution). Each supports `DRY_RUN=true` for write operations and has built-in `help` commands. No new dependencies beyond standard Unix tools + `curl` + `jq`.
Design doc and implementation plan included in `docs/plans/`.
## Test plan
- [ ] Run `releasing/preflight_check.sh` — verify pass/fail/warn report
- [ ] Run `releasing/jira_ops.sh help` — verify usage without credentials
- [ ] Run `releasing/nexus_ops.sh help` — verify usage without credentials
- [ ] Run `releasing/dist_ops.sh help` — verify usage without env vars
- [ ] Run `releasing/generate_email.sh vote 1.20.0 1` — verify template output
- [ ] Run `releasing/generate_email.sh announce 1.20.0` — verify "first release" wording
- [ ] Run `releasing/generate_email.sh announce 1.20.1` — verify "bugfix release" wording
- [ ] Run `releasing/pyflink_ops.sh help` — verify usage
- [ ] Run `releasing/update_all_versions.sh help` — verify usage without env vars
- [ ] Run `RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh show-cross-repo-tasks` — verify checklist
- [ ] Run `DRY_RUN=true` on write commands to verify no real API calls are made
- [ ] Verify credentials are not leaked via xtrace output
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #27608:
URL: https://github.com/apache/flink/pull/27608#discussion_r2811896965
##########
tools/releasing/update_all_versions.sh:
##########
@@ -0,0 +1,193 @@
+#!/usr/bin/env bash
+
+#
+# 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.
+#
+
+##
+## Cross-repo version update operations for major Flink releases.
+## Handles version-related updates beyond what update_branch_version.sh covers.
+##
+## Usage:
+## tools $ RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh add-flink-version
+## tools $ RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh update-nightly-workflow
+## tools $ RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh show-cross-repo-tasks
+##
+## These operations are only needed for major releases (x.y.0).
+##
+
+set -o errexit
+set -o nounset
+set -o pipefail
+set -o xtrace
+
+CURR_DIR=`pwd`
+if [[ `basename $CURR_DIR` != "tools" ]] ; then
+ echo "You have to call the script from the tools/ dir"
+ exit 1
+fi
+
+DRY_RUN=${DRY_RUN:-false}
+
+COMMAND=${1:-help}
+
+cd ..
+FLINK_DIR=`pwd`
+
+cmd_add_flink_version() {
+ if [ -z "${RELEASE_VERSION:-}" ]; then echo "RELEASE_VERSION not set."; exit 1; fi
+
+ local MAJOR=`echo "$RELEASE_VERSION" | cut -d. -f1`
+ local MINOR=`echo "$RELEASE_VERSION" | cut -d. -f2`
+
+ echo "=== Adding FlinkVersion enum entry ==="
+
+ local version_file=`find "$FLINK_DIR" -path "*/flink-annotations/src/main/java/org/apache/flink/FlinkVersion.java" -type f`
+
+ if [ -z "$version_file" ]; then
+ echo "ERROR: FlinkVersion.java not found"
+ exit 1
+ fi
+
+ echo "File: $version_file"
+
+ local version_enum="v${MAJOR}_${MINOR}"
+ if grep -q "$version_enum" "$version_file"; then
+ echo "Version ${version_enum} already exists in FlinkVersion.java"
+ return 0
+ fi
+
+ local version_string="${MAJOR}.${MINOR}"
+
+ if [ "$DRY_RUN" = "true" ]; then
+ echo "[dry-run] Would add: ${version_enum}(\"${version_string}\");"
+ echo "[dry-run] to: $version_file"
+ return 0
+ fi
+
+ # Find the last version entry line number
+ local last_version_line
+ last_version_line=`grep -n 'v[0-9]*_[0-9]*("' "$version_file" | tail -1 | cut -d: -f1`
+
+ if [ -z "$last_version_line" ]; then
+ echo "ERROR: Could not find existing version entries in FlinkVersion.java"
+ exit 1
+ fi
+
+ # Get indent from existing line
+ local last_line_content
+ last_line_content=`sed -n "${last_version_line}p" "$version_file"`
+ local indent
+ indent=`echo "$last_line_content" | sed 's/[^ ].*//'`
+
+ # Replace trailing semicolon with comma on last entry using perl (macOS-safe)
+ perl -pi -e "s/;$/,/ if \$. == ${last_version_line}" "$version_file"
+
+ # Insert new version AFTER last entry by appending to the line's output
+ perl -pi -e "\$_ .= \"${indent}${version_enum}(\\\"${version_string}\\\");\n\" if \$. == ${last_version_line}" "$version_file"
+
+ echo "Added ${version_enum}(\"${version_string}\") to FlinkVersion.java"
+}
+
+cmd_update_nightly_workflow() {
+ if [ -z "${RELEASE_VERSION:-}" ]; then echo "RELEASE_VERSION not set."; exit 1; fi
+
+ local MAJOR=`echo "$RELEASE_VERSION" | cut -d. -f1`
+ local MINOR=`echo "$RELEASE_VERSION" | cut -d. -f2`
+
+ echo "=== Updating GitHub Actions nightly workflow ==="
+
+ local workflow_file="$FLINK_DIR/.github/workflows/nightly-trigger.yml"
+
+ if [ ! -f "$workflow_file" ]; then
+ echo "WARNING: $workflow_file not found. Skipping."
+ return 0
+ fi
+
+ echo "File: $workflow_file"
+ echo ""
+ echo "The nightly workflow should include the two most recent release branches and master."
+ echo "Please manually verify the branch list in:"
+ echo " $workflow_file"
+ echo ""
+ echo "Expected branches: master, release-${MAJOR}.${MINOR}, release-${MAJOR}.$((MINOR - 1))"
+}
+
+cmd_show_cross_repo_tasks() {
+ if [ -z "${RELEASE_VERSION:-}" ]; then echo "RELEASE_VERSION not set."; exit 1; fi
+
+ local MAJOR=`echo "$RELEASE_VERSION" | cut -d. -f1`
+ local MINOR=`echo "$RELEASE_VERSION" | cut -d. -f2`
+ local PATCH=`echo "$RELEASE_VERSION" | cut -d. -f3`
+
+ echo "=== Cross-Repository Tasks for Flink ${RELEASE_VERSION} ==="
+ echo ""
+ echo "The following updates must be made in OTHER repositories."
+ echo ""
+
+ echo "1. flink-docker repository:"
Review Comment:
I am curious - this script is a show commands - does not seem to issue git commands like `git clone https://github.com/apache/flink-docker` but just lists them. Are we thinking of running them in a script? Maybe after a dry run before any actual mutations. Maybe a run-cross-repo-tasks option.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #27608:
URL: https://github.com/apache/flink/pull/27608#issuecomment-3900367038
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "854921d9a12bcc083bf79e558cf3297df054a5a2",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "854921d9a12bcc083bf79e558cf3297df054a5a2",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 854921d9a12bcc083bf79e558cf3297df054a5a2 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "nateab (via GitHub)" <gi...@apache.org>.
nateab commented on PR #27608:
URL: https://github.com/apache/flink/pull/27608#issuecomment-3910443780
@davidradl thanks for the suggestion! I think a FLIP is a good idea because this is a first step that I wanted to build upon before layering on more automation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #27608:
URL: https://github.com/apache/flink/pull/27608#discussion_r2811896965
##########
tools/releasing/update_all_versions.sh:
##########
@@ -0,0 +1,193 @@
+#!/usr/bin/env bash
+
+#
+# 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.
+#
+
+##
+## Cross-repo version update operations for major Flink releases.
+## Handles version-related updates beyond what update_branch_version.sh covers.
+##
+## Usage:
+## tools $ RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh add-flink-version
+## tools $ RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh update-nightly-workflow
+## tools $ RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh show-cross-repo-tasks
+##
+## These operations are only needed for major releases (x.y.0).
+##
+
+set -o errexit
+set -o nounset
+set -o pipefail
+set -o xtrace
+
+CURR_DIR=`pwd`
+if [[ `basename $CURR_DIR` != "tools" ]] ; then
+ echo "You have to call the script from the tools/ dir"
+ exit 1
+fi
+
+DRY_RUN=${DRY_RUN:-false}
+
+COMMAND=${1:-help}
+
+cd ..
+FLINK_DIR=`pwd`
+
+cmd_add_flink_version() {
+ if [ -z "${RELEASE_VERSION:-}" ]; then echo "RELEASE_VERSION not set."; exit 1; fi
+
+ local MAJOR=`echo "$RELEASE_VERSION" | cut -d. -f1`
+ local MINOR=`echo "$RELEASE_VERSION" | cut -d. -f2`
+
+ echo "=== Adding FlinkVersion enum entry ==="
+
+ local version_file=`find "$FLINK_DIR" -path "*/flink-annotations/src/main/java/org/apache/flink/FlinkVersion.java" -type f`
+
+ if [ -z "$version_file" ]; then
+ echo "ERROR: FlinkVersion.java not found"
+ exit 1
+ fi
+
+ echo "File: $version_file"
+
+ local version_enum="v${MAJOR}_${MINOR}"
+ if grep -q "$version_enum" "$version_file"; then
+ echo "Version ${version_enum} already exists in FlinkVersion.java"
+ return 0
+ fi
+
+ local version_string="${MAJOR}.${MINOR}"
+
+ if [ "$DRY_RUN" = "true" ]; then
+ echo "[dry-run] Would add: ${version_enum}(\"${version_string}\");"
+ echo "[dry-run] to: $version_file"
+ return 0
+ fi
+
+ # Find the last version entry line number
+ local last_version_line
+ last_version_line=`grep -n 'v[0-9]*_[0-9]*("' "$version_file" | tail -1 | cut -d: -f1`
+
+ if [ -z "$last_version_line" ]; then
+ echo "ERROR: Could not find existing version entries in FlinkVersion.java"
+ exit 1
+ fi
+
+ # Get indent from existing line
+ local last_line_content
+ last_line_content=`sed -n "${last_version_line}p" "$version_file"`
+ local indent
+ indent=`echo "$last_line_content" | sed 's/[^ ].*//'`
+
+ # Replace trailing semicolon with comma on last entry using perl (macOS-safe)
+ perl -pi -e "s/;$/,/ if \$. == ${last_version_line}" "$version_file"
+
+ # Insert new version AFTER last entry by appending to the line's output
+ perl -pi -e "\$_ .= \"${indent}${version_enum}(\\\"${version_string}\\\");\n\" if \$. == ${last_version_line}" "$version_file"
+
+ echo "Added ${version_enum}(\"${version_string}\") to FlinkVersion.java"
+}
+
+cmd_update_nightly_workflow() {
+ if [ -z "${RELEASE_VERSION:-}" ]; then echo "RELEASE_VERSION not set."; exit 1; fi
+
+ local MAJOR=`echo "$RELEASE_VERSION" | cut -d. -f1`
+ local MINOR=`echo "$RELEASE_VERSION" | cut -d. -f2`
+
+ echo "=== Updating GitHub Actions nightly workflow ==="
+
+ local workflow_file="$FLINK_DIR/.github/workflows/nightly-trigger.yml"
+
+ if [ ! -f "$workflow_file" ]; then
+ echo "WARNING: $workflow_file not found. Skipping."
+ return 0
+ fi
+
+ echo "File: $workflow_file"
+ echo ""
+ echo "The nightly workflow should include the two most recent release branches and master."
+ echo "Please manually verify the branch list in:"
+ echo " $workflow_file"
+ echo ""
+ echo "Expected branches: master, release-${MAJOR}.${MINOR}, release-${MAJOR}.$((MINOR - 1))"
+}
+
+cmd_show_cross_repo_tasks() {
+ if [ -z "${RELEASE_VERSION:-}" ]; then echo "RELEASE_VERSION not set."; exit 1; fi
+
+ local MAJOR=`echo "$RELEASE_VERSION" | cut -d. -f1`
+ local MINOR=`echo "$RELEASE_VERSION" | cut -d. -f2`
+ local PATCH=`echo "$RELEASE_VERSION" | cut -d. -f3`
+
+ echo "=== Cross-Repository Tasks for Flink ${RELEASE_VERSION} ==="
+ echo ""
+ echo "The following updates must be made in OTHER repositories."
+ echo ""
+
+ echo "1. flink-docker repository:"
Review Comment:
I am curious - this script is a show commands - does not seem to issue git commands like `git clone https://github.com/apache/flink-docker` but just lists them. Are we thinking of running them in a script? Maybe after a dry run before any actual mutations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #27608:
URL: https://github.com/apache/flink/pull/27608#discussion_r2811905214
##########
tools/releasing/preflight_check.sh:
##########
@@ -0,0 +1,184 @@
+#!/usr/bin/env bash
+
+#
+# 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.
+#
+
+##
+## Pre-flight checks for Flink release prerequisites.
Review Comment:
I suggest the scripts that require these prereqs to run, run this as their first line - so they cannot hit prereq issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on PR #27608:
URL: https://github.com/apache/flink/pull/27608#issuecomment-3908711970
@nateab Great idea ! I suggest a Flip and dev list discussion, as these sort of scripts should be release agnostic and many of the scripts might be able to be used for other repos like the connectors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27608:
URL: https://github.com/apache/flink/pull/27608#issuecomment-4475491728
This PR is being marked as stale since it has not had any activity in the last 90 days.
If you would like to keep this PR alive, please leave a comment asking for a review.
If the PR has merge conflicts, update it with the latest from the base branch.
If you are having difficulty finding a reviewer, please reach out to the
community, contact details can be found here: https://flink.apache.org/what-is-flink/community/
If this PR is no longer valid or desired, please feel free to close it.
If no activity occurs in the next 30 days, it will be automatically closed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #27608: Add release automation scripts (Phase A)
URL: https://github.com/apache/flink/pull/27608
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #27608:
URL: https://github.com/apache/flink/pull/27608#discussion_r2811871401
##########
tools/releasing/update_all_versions.sh:
##########
@@ -0,0 +1,193 @@
+#!/usr/bin/env bash
+
+#
+# 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.
+#
+
+##
+## Cross-repo version update operations for major Flink releases.
+## Handles version-related updates beyond what update_branch_version.sh covers.
+##
+## Usage:
+## tools $ RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh add-flink-version
+## tools $ RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh update-nightly-workflow
+## tools $ RELEASE_VERSION=1.20.0 releasing/update_all_versions.sh show-cross-repo-tasks
+##
+## These operations are only needed for major releases (x.y.0).
+##
+
+set -o errexit
+set -o nounset
+set -o pipefail
+set -o xtrace
+
+CURR_DIR=`pwd`
+if [[ `basename $CURR_DIR` != "tools" ]] ; then
+ echo "You have to call the script from the tools/ dir"
+ exit 1
+fi
+
+DRY_RUN=${DRY_RUN:-false}
+
+COMMAND=${1:-help}
+
+cd ..
+FLINK_DIR=`pwd`
+
+cmd_add_flink_version() {
+ if [ -z "${RELEASE_VERSION:-}" ]; then echo "RELEASE_VERSION not set."; exit 1; fi
+
+ local MAJOR=`echo "$RELEASE_VERSION" | cut -d. -f1`
+ local MINOR=`echo "$RELEASE_VERSION" | cut -d. -f2`
+
+ echo "=== Adding FlinkVersion enum entry ==="
+
+ local version_file=`find "$FLINK_DIR" -path "*/flink-annotations/src/main/java/org/apache/flink/FlinkVersion.java" -type f`
+
+ if [ -z "$version_file" ]; then
+ echo "ERROR: FlinkVersion.java not found"
+ exit 1
+ fi
+
+ echo "File: $version_file"
+
+ local version_enum="v${MAJOR}_${MINOR}"
+ if grep -q "$version_enum" "$version_file"; then
+ echo "Version ${version_enum} already exists in FlinkVersion.java"
+ return 0
+ fi
+
+ local version_string="${MAJOR}.${MINOR}"
+
+ if [ "$DRY_RUN" = "true" ]; then
+ echo "[dry-run] Would add: ${version_enum}(\"${version_string}\");"
+ echo "[dry-run] to: $version_file"
+ return 0
+ fi
+
+ # Find the last version entry line number
+ local last_version_line
+ last_version_line=`grep -n 'v[0-9]*_[0-9]*("' "$version_file" | tail -1 | cut -d: -f1`
+
+ if [ -z "$last_version_line" ]; then
+ echo "ERROR: Could not find existing version entries in FlinkVersion.java"
+ exit 1
+ fi
+
+ # Get indent from existing line
+ local last_line_content
+ last_line_content=`sed -n "${last_version_line}p" "$version_file"`
+ local indent
+ indent=`echo "$last_line_content" | sed 's/[^ ].*//'`
+
+ # Replace trailing semicolon with comma on last entry using perl (macOS-safe)
+ perl -pi -e "s/;$/,/ if \$. == ${last_version_line}" "$version_file"
+
+ # Insert new version AFTER last entry by appending to the line's output
+ perl -pi -e "\$_ .= \"${indent}${version_enum}(\\\"${version_string}\\\");\n\" if \$. == ${last_version_line}" "$version_file"
+
+ echo "Added ${version_enum}(\"${version_string}\") to FlinkVersion.java"
+}
+
+cmd_update_nightly_workflow() {
+ if [ -z "${RELEASE_VERSION:-}" ]; then echo "RELEASE_VERSION not set."; exit 1; fi
+
+ local MAJOR=`echo "$RELEASE_VERSION" | cut -d. -f1`
+ local MINOR=`echo "$RELEASE_VERSION" | cut -d. -f2`
Review Comment:
the usage says it should be 1.20.0 - I suggest checking that the 3rd segment is 0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add release automation scripts (Phase A) [flink]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27608:
URL: https://github.com/apache/flink/pull/27608#issuecomment-4727574398
This PR has been closed since it has not had any activity in 120 days.
If you feel like this was a mistake, or you would like to continue working on it,
please feel free to re-open the PR and ask for a review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org