wudsn-ide/com.wudsn.site.update/site.ant
2020-10-13 01:56:16 +02:00

78 lines
2.6 KiB
XML

<!--
The first target is "build_daily". It ends with manual step.
The result can then be uploaded with "upload_all".
If the daily build is tested and OK, the target "publish_daily_to_stable_and_main" copies
it to the current main version field and the default update site folder and then triggers "upload_all".
-->
<project name="Site" basedir="." default="build_daily">
<target name="_clean_folder">
<echo message="Cleaning ${folder}" />
<delete dir="${folder}/features" />
<delete dir="${folder}/plugins" />
<delete file="${folder}/artifacts.jar" />
<delete file="${folder}/content.jar" />
</target>
<target name="_copy_folder">
<antcall target="_clean_folder">
<param name="folder" value="${target}" />
</antcall>
<echo message="Copying ${source} to ${target}" />
<copy todir="${target}" preservelastmodified="true">
<fileset file="${source}/artifacts.jar" />
<fileset file="${source}/content.jar" />
<fileset file="${source}/site.xml" />
</copy>
<copy todir="${target}/features" preservelastmodified="true">
<fileset file="${source}/features/**" />
</copy>
<copy todir="${target}/plugins" preservelastmodified="true">
<fileset file="${source}/plugins/**" />
</copy>
</target>
<!-- This refreshes bundle versions in the source projects-->
<target name="check_bundle_versions" >
<exec dir="." executable="cmd.exe">
<arg line="/c check-bundle-versions"/>
</exec>
</target>
<!-- This refreshes the daily build for testing -->
<target name="build_daily" >
<antcall target="_clean_folder">
<param name="folder" value="daily" />
</antcall>
<copy tofile="daily\site.xml" preservelastmodified="true" overwrite="true">
<fileset file="daily/site-template.xml" />
</copy>
<echo>Open daily/site.xml and press "Build All".</echo>
</target>
<!-- This publishes the daily build when testing was successful -->
<target name="publish_daily_to_stable_and_main">
<echo>Copying daily to stable and main.</echo>
<antcall target="_copy_folder">
<param name="source" value="daily" />
<param name="target" value="1.7.1" />
</antcall>
<antcall target="_copy_folder">
<param name="source" value="daily" />
<param name="target" value="." />
</antcall>
<antcall target="upload_all" />
<echo>Done.</echo>
</target>
<target name="upload_all">
<echo>Uploading builds from ${basedir}.</echo>
<exec executable="C:\jac\system\Windows\Tools\NET\WinSCP\WinSCP.com">
<arg value="/script=site.scp"/>
</exec>
<echo>Upload completed.</echo>
</target>
</project>