This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch release-1.15
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 771000c511031b4c24917addd4cea494ac4bb48e
Author: Chesnay Schepler <ches...@apache.org>
AuthorDate: Tue Sep 13 14:19:50 2022 +0200

    [FLINK-29260][release] Wipe exclusion list when updating reference version
---
 pom.xml                                         |  2 ++
 tools/releasing/update_japicmp_configuration.sh | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/pom.xml b/pom.xml
index 5791fc4f90b..1475afe30bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2140,6 +2140,7 @@ under the License.
                                                        <excludes>
                                                                
<exclude>@org.apache.flink.annotation.Experimental</exclude>
                                                                
<exclude>@org.apache.flink.annotation.Internal</exclude>
+                                                               <!-- MARKER: 
start exclusions; these will be wiped by 
tools/releasing/update_japicmp_configuration.sh -->
                                                                
<exclude>org.apache.flink.streaming.api.datastream.DataStream#DataStream(org.apache.flink.streaming.api.environment.StreamExecutionEnvironment,org.apache.flink.streaming.api.transformations.StreamTransformation)</exclude>
                                                                
<exclude>org.apache.flink.streaming.api.environment.LegacyLocalStreamEnvironment</exclude>
                                                                
<exclude>org.apache.flink.streaming.api.functions.sink.RichSinkFunction#invoke(java.lang.Object)</exclude>
@@ -2152,6 +2153,7 @@ under the License.
                                                                
<exclude>org.apache.flink.api.scala.hadoop.mapred.HadoopOutputFormat</exclude>
                                                                
<exclude>org.apache.flink.api.scala.hadoop.mapreduce.HadoopInputFormat</exclude>
                                                                
<exclude>org.apache.flink.api.scala.hadoop.mapreduce.HadoopOutputFormat</exclude>
+                                                               <!-- MARKER: 
end exclusions -->
                                                        </excludes>
                                                        
<accessModifier>public</accessModifier>
                                                        
<breakBuildOnModifications>false</breakBuildOnModifications>
diff --git a/tools/releasing/update_japicmp_configuration.sh 
b/tools/releasing/update_japicmp_configuration.sh
index e8678a7c765..45a4661c994 100755
--- a/tools/releasing/update_japicmp_configuration.sh
+++ b/tools/releasing/update_japicmp_configuration.sh
@@ -59,6 +59,15 @@ function set_japicmp_reference_version() {
   perl -pi -e 
's#(<japicmp.referenceVersion>).*(</japicmp.referenceVersion>)#${1}'${version}'${2}#'
 ${POM}
 }
 
+function clear_exclusions() {
+  exclusion_start=$(($(sed -n '/<!-- MARKER: start exclusions/=' ${POM}) + 1))
+  exclusion_end=$(($(sed -n '/<!-- MARKER: end exclusions/=' ${POM}) - 1))
+
+  if [[ $exclusion_start -lt $exclusion_end ]]; then
+    sed -i "${exclusion_start},${exclusion_end}d" ${POM}
+  fi
+}
+
 current_branch=$(git rev-parse --abbrev-ref HEAD)
 
 if [[ ${current_branch} =~ -rc ]]; then
@@ -73,10 +82,12 @@ if [[ ${current_branch} =~ -rc ]]; then
 elif [[ ${current_branch} =~ ^master$ ]]; then
   # master branch
   set_japicmp_reference_version ${NEW_VERSION}
+  clear_exclusions
 elif [[ ${current_branch} =~ ^release- ]]; then
   # snapshot branch
   set_japicmp_reference_version ${NEW_VERSION}
   enable_public_evolving_compatibility_checks
+  clear_exclusions
 else
   echo "Script was called from unexpected branch ${current_branch}; should be 
rc/snapshot/master branch."
   exit 1

Reply via email to