zentol commented on a change in pull request #12340:
URL: https://github.com/apache/flink/pull/12340#discussion_r431015632
##########
File path: tools/releasing/create_release_branch.sh
##########
@@ -59,6 +59,22 @@ git checkout -b $target_branch
#change version in all pom files
find . -name 'pom.xml' -type f -exec perl -pi -e
's#<version>(.*)'$OLD_VERSION'(.*)</version>#<version>${1}'$NEW_VERSION'${2}</version>#'
{} \;
+ultra=$(echo "${NEW_VERSION}" | perl -p -e 's#(\d+)\.\d+\.\d+#$1#')
+major=$(echo "${NEW_VERSION}" | perl -p -e 's#\d+\.(\d+)\.\d+#$1#')
+minor=$(echo "${NEW_VERSION}" | perl -p -e 's#\d+\.\d+\.(\d+)#$1#')
+
+# update japicmp configuration
+if [[ ${minor} == "0" ]]; then
+ # set japicmp reference version to previous major version
+ perl -pi -e
's#(<japicmp.referenceVersion>).*(</japicmp.referenceVersion>)#${1}'${ultra}.$((${major}-1)).0'${2}#'
pom.xml
+else
+ # set japicmp reference version to previous minor version
+ perl -pi -e
's#(<japicmp.referenceVersion>).*(</japicmp.referenceVersion>)#${1}'${ultra}.${major}.$(($minor
- 1))'${2}#' pom.xml
+ # harden compatibility constraints for minor versions
+ perl -pi -e
's#<!--(<include>\@org.apache.flink.annotation.PublicEvolving</include>)-->#${1}#'
pom.xml
+ perl -pi -e
's#\t+<exclude>\@org.apache.flink.annotation.PublicEvolving.*\n##' pom.xml
+fi
Review comment:
It wasn't the original idea, I just remembered wrong how the release
process works.
As for the manual work, the RM has to un-comment the line, remove the
exclusion and update the reference version to the last release minor version.
Ultimately the logic is identical, so I'll see if I can refactor this update
into a separate script that the RM can call.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]