Skip to content

Commit

Permalink
Merge pull request #4678 from evolvedbinary/4.x.x/hotfix/canonical-so…
Browse files Browse the repository at this point in the history
…urce-of-apps

[4.x.x] Canonical source of apps
  • Loading branch information
joewiz authored Jan 12, 2023
2 parents 2be8673 + d30379d commit 2fce223
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 35 deletions.
3 changes: 2 additions & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ keystore.password = secret
keystore.file = key.store
keystore.validity = 100000

autodeploy=dashboard,shared,eXide,monex,functx,usermanager
autodeploy.dir=autodeploy
autodeploy=shared,dashboard,functx,usermanager,eXide,monex,doc,fundocs,markdown
autodeploy.repo=http://demo.exist-db.org/exist/apps/public-repo
use.autodeploy.feature=true

Expand Down
31 changes: 7 additions & 24 deletions build/scripts/installer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
<property name="installer.scripts" value="installer/scripts"/>
<property name="installer.mac.icon" value="${installer.scripts}/icon.icns"/>

<property file="installer/apps.properties"/>

<target name="commandline-installer">
</target>

Expand Down Expand Up @@ -78,31 +76,16 @@
<target name="download-xars" description="Download xars to include in installer" depends="clean-installer-xars-dir">
<mkdir dir="${apps.dir}"/>
<echo message="Downloading xar packages to include in installer ..."/>
<foreach list="${apps}" target="download-xar" param="xar"></foreach>

<move todir="${apps.dir}">
<fileset dir="${apps.dir}">
<include name="shared*.xar"/>
</fileset>
<mapper type="glob" from="*" to="00*"/>
</move>
</target>
<ant antfile="build/scripts/setup.xml" dir="." inheritall="false"/>

<target name="download-xar">
<!-- get dest="${apps.dir}" src="${apps.repo}/find?abbrev=${xar}&amp;processor=${project.version}"
verbose="on" maxtime="180" usetimestamp="true" tryGzipEncoding="true"/ -->
<!-- copy the xars to the location for the installer -->
<copy todir="${apps.dir}">
<fileset dir="${autodeploy.dir}">
<include name="*.xar"/>
</fileset>
</copy>

<taskdef name="fetch" classname="nl.ow.dilemma.ant.fetch.FetchTask">
<classpath>
<pathelement location="${asocat-exist.jar}"/>
</classpath>
</taskdef>
<fetch dest="${apps.dir}" url="${apps.repo}/find?abbrev=${xar}&amp;processor=${project.version}&amp;zip=yes"
failonerror="true" maxtime="180">
<patternset>
<include name="**/*.xar"/>
</patternset>
</fetch>
</target>

<target name="xars" depends="download-xars" description="Scan apps directory and include all .xar files into installer">
Expand Down
23 changes: 15 additions & 8 deletions build/scripts/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@

<property file="build.properties"/>

<property name="autostart-dir" value="autodeploy"/>

<target name="prepare">
<mkdir dir="${autostart-dir}"/>
<mkdir dir="${autodeploy.dir}"/>
<!-- Automatically download standard xar packages from public repository
if autostart directory is empty.
-->
<path id="autostart-files">
<fileset dir="${autostart-dir}">
<fileset dir="${autodeploy.dir}">
<include name="*.xar"/>
</fileset>
</path>
Expand All @@ -47,31 +45,40 @@
<target name="setup" depends="prepare" description="Download standard xar packages.">
<echo message="Downloading xar packages: ${autodeploy}..."/>
<foreach list="${autodeploy}" target="download" param="xar"></foreach>

<!-- rename the shared-resources xar -->
<move todir="${autodeploy.dir}">
<fileset dir="${autodeploy.dir}">
<include name="shared*.xar"/>
</fileset>
<mapper type="glob" from="*" to="00*"/>
</move>

</target>

<target name="download">
<pathconvert property="xar-installed" setonempty="false">
<fileset dir="${autostart-dir}">
<fileset dir="${autodeploy.dir}">
<include name="${xar}-*.xar"/>
</fileset>
</pathconvert>
<condition property="xar-found-status" value="Existing copy of ${xar} found at ${xar-installed}. Download will be skipped." else="No copy of ${xar} found in ${autostart-dir}. Download will be attempted.">
<condition property="xar-found-status" value="Existing copy of ${xar} found at ${xar-installed}. Download will be skipped." else="No copy of ${xar} found in ${autodeploy.dir}. Download will be attempted.">
<isset property="xar-installed"/>
</condition>
<echo message="${xar-found-status}"/>
<antcall target="download-xar"/>
</target>

<target name="download-xar" unless="xar-installed">
<!-- get dest="${autostart-dir}" src="${autodeploy.repo}/find?abbrev=${xar}&amp;processor=${project.version}"
<!-- get dest="${autodeploy.dir}" src="${autodeploy.repo}/find?abbrev=${xar}&amp;processor=${project.version}"
verbose="on" maxtime="180" usetimestamp="true" tryGzipEncoding="true"/ -->

<taskdef name="fetch" classname="nl.ow.dilemma.ant.fetch.FetchTask">
<classpath>
<pathelement location="${asocat-exist.jar}"/>
</classpath>
</taskdef>
<fetch dest="${autostart-dir}" url="${autodeploy.repo}/find?abbrev=${xar}&amp;processor=${project.version}&amp;zip=yes"
<fetch dest="${autodeploy.dir}" url="${autodeploy.repo}/find?abbrev=${xar}&amp;processor=${project.version}&amp;zip=yes"
failonerror="true" failonzeroextracted="true" maxtime="180">
<patternset>
<include name="**/*.xar"/>
Expand Down
2 changes: 0 additions & 2 deletions installer/apps.properties

This file was deleted.

0 comments on commit 2fce223

Please sign in to comment.