You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sa...@apache.org on 2021/04/27 11:02:15 UTC

[cassandra] branch cassandra-2.2 updated: Follow up fixes to CASSANDRA-16633

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

samt pushed a commit to branch cassandra-2.2
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-2.2 by this push:
     new 26163bb  Follow up fixes to CASSANDRA-16633
26163bb is described below

commit 26163bb12aac590289aab6deabc21fe86371e22a
Author: Sam Tunnicliffe <sa...@beobal.com>
AuthorDate: Tue Apr 27 10:16:28 2021 +0100

    Follow up fixes to CASSANDRA-16633
    
    * Don't run rat check if git fails or not available
    * Check for presence of rat.txt before running eclipse-warnings task
      (to ensure that the report is always generated by CI runs)
    
    Patch by Sam Tunnicliffe; reviewed by Mick Semb Wever for CASSANDRA-16633
---
 .build/build-rat.xml | 18 +++++++++++++++++-
 build.xml            |  3 +--
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/.build/build-rat.xml b/.build/build-rat.xml
index 6565410..195edc9 100644
--- a/.build/build-rat.xml
+++ b/.build/build-rat.xml
@@ -33,9 +33,14 @@
     </target>
 
     <target name="_build_ratinclude" depends="_rat_init">
-        <exec executable="git" failifexecutionfails="true" failonerror="true" output="build/.versioned_files">
+        <exec executable="git" failifexecutionfails="false" failonerror="false" resultproperty="git.success" output="build/.versioned_files">
             <arg line="ls-tree -r HEAD --name-only"/>
         </exec>
+        <condition property="rat.skip" value="true">
+            <not>
+                <equals arg1="${git.success}" arg2="0"/>
+            </not>
+        </condition>
         <copy file="build/.versioned_files" tofile="build/.ratinclude">
             <filterchain>
                 <linecontainsregexp>
@@ -101,4 +106,15 @@
     <target name="write-java-license-headers" unless="without.rat" description="Add missing java license headers">
       <antcall target="_write_java_license_headers" />
     </target>
+
+    <target name="_assert_rat_output">
+        <fail message="The rat report at build/rat.txt was not generated. Please ensure that the rat-check task is able to run successfully. For dev builds only, touch build/rat.txt to skip this check">
+            <condition>
+                <not>
+                    <available file="build/rat.txt" />
+                </not>
+            </condition>
+        </fail>
+    </target>
+
 </project>
diff --git a/build.xml b/build.xml
index 014a77c..064d16d 100644
--- a/build.xml
+++ b/build.xml
@@ -1920,8 +1920,7 @@
   	<delete dir="build/eclipse-classes" />
   </target>
 
-
-  <target name="eclipse-warnings" depends="build" description="Run eclipse compiler code analysis">        
+  <target name="eclipse-warnings" depends="build, _assert_rat_output" description="Run eclipse compiler code analysis">
         <property name="ecj.log.dir" value="${build.dir}/ecj" />
         <property name="ecj.warnings.file" value="${ecj.log.dir}/eclipse_compiler_checks.txt"/>
         <delete dir="${ecj.log.dir}" />

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org