Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

ANT task for update of reactUI of JVx application

I configured my JVx application for using reactUI and saw that there are nightly builds. I want to update my application automatically with latest nightly build. Is there an ant task for this use-case? I’m using ant to build my application.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

With some help of ChatGPT:

  <target name="start.updateReactUI.nightly" description="Updates reactUI with nightly build">
    
    <tstamp>
      <format property="datepattern" pattern="dd_MM_yyyy"/>
    <!--
      one day earlier
      <format property="datepattern" pattern="dd_MM_yyyy" offset="-1" unit="day" />
    -->
    </tstamp>
    
    <get src="https://github.com/sibvisions/reactUI/releases/download/build-${datepattern}/reactBuild_${datepattern}.zip" dest="${build}/nightly.zip" usetimestamp="true"/>
    
    <delete file="${build}/nightly" />
    
    <unzip src="${build}/nightly.zip" dest="${build}/nightly">
      <!-- extract sub directory -->
      <patternset>
        <include name="build/*"/>
      </patternset>
      <mapper>
        <globmapper from="build/*" to="*"/>
      </mapper>
    </unzip>

    <!-- Delete old files -->
    <delete includeEmptyDirs="true">
      <fileset dir="${based}/WebContent/ui">
        <!-- keep css of project -->
        <exclude name="*.css"/>
        <exclude name="favicon.ico"/>
      </fileset>
    </delete>
    
    <!-- Copy new files -->
    <copy todir="${based}/WebContent/ui">
      <fileset dir="${build}/nightly">
        <!-- ignore css of build -->
        <exclude name="*.css" />
        <exclude name="favicon.ico" />
      </fileset>
    </copy>
    
  </target>

But be careful, because there are no nightly builds on Saturday or Sunday, but the date is one day ahead! Saturday build is with source code of Friday. No build on Sunday and Monday. The Tuesday build is with source code of Monday. Looks like they build after midnight.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading