MartijnVisser commented on code in PR #62:
URL:
https://github.com/apache/flink-connector-shared-utils/pull/62#discussion_r4371111112
##########
update_branch_version.sh:
##########
@@ -33,7 +33,7 @@ function update_branch_version {
set_pom_version "${NEW_VERSION}"
- git commit -am "Update version to $NEW_VERSION"
+ git commit -m "Update version to $NEW_VERSION" -- '*pom.xml'
Review Comment:
Agreed, `*pom.xml` also matches a file like `x-pom.xml`. Changed both.
##########
_utils.sh:
##########
@@ -59,9 +59,19 @@ function create_pristine_source {
}
function get_pom_version {
+ local version
+ local version_pattern='^[0-9]+(\.[0-9]+)*(-[0-9A-Za-z.]+)*$'
set +u
Review Comment:
No, they were only there because of the exported `SHELLOPTS` (d314bab):
`bin/mvn` failed on the unset `MAVEN_SKIP_RC`. I've dropped them in a separate
commit. `stage_jars.sh` keeps its pair, since `FLINK_VERSION` is unset for
connector-parent releases.
##########
_utils.sh:
##########
@@ -71,8 +81,12 @@ function set_pom_version {
}
function is_flink_version_set_in_pom {
+ local version
set +u
- version=$(${MVN} help:evaluate -Dexpression="flink.version" -q -DforceStdout)
+ version=$(${MVN} help:evaluate -Dexpression="flink.version" -q
-DforceStdout) || {
+ echo "Maven failed to read flink.version." >&2
+ exit 1
+ }
Review Comment:
Good point, done with one change: the connector parent declares an empty
`<flink.version/>`, so Maven prints an empty string there, not `null object or
invalid expression`. Both count as false now; anything else stops the script.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]