Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

139 lines (116 sloc) 6.037 kB
<project name="com.buglabs.dragonfly.dm.feature" default="publish">
<import file="common.xml" />
<property name="project.feature" value="com.buglabs.dragonfly.dm.feature" />
<property name="meta.project" value="com.buglabs.dragonfly.dm" />
<property name="eclipse.dir" value="/opt/jenkins/build-deps/com.eclipse.sdk" />
<property name="eclipse.default.file" value="${eclipse.dir}/eclipse-lin.tar.gz" />
<!-- ===================================================================== -->
<!-- Build properties setup -->
<!-- Depending on how this script is executed build properties are either generated or inhereted from calling script -->
<!-- ===================================================================== -->
<if>
<not>
<isset property="full.sdk.build.id" />
</not>
<then>
<echo message="[Build type]: Running individual component build..." />
<tstamp />
<property name="timestamp" value="${DSTAMP}${TSTAMP}" />
<property name="build.id" value="v${timestamp}_${build.letter}" />
<property name="build.label" value="2.0.${build.id}" />
<property name="meta.project.version" value="${build.id}" />
</then>
<else>
<echo message="[Build type]: Running full SDK component build..." />
<property name="build.id" value="${full.sdk.build.id}" />
<property name="build.label" value="2.0.${build.id}" />
<property name="meta.project.version" value="${build.id}" />
</else>
</if>
<target name="fetch.dependencies" depends="">
<echo message="Checking out projects from svn and preparing directories..." />
<mkdir dir="${checkout.dir}/${project.feature}/build" />
<mkdir dir="${checkout.dir}/${project.feature}/build/plugins" />
<mkdir dir="${checkout.dir}/${project.feature}/build/features" />
<copy todir="${checkout.dir}/${project.feature}/build/plugins">
<fileset dir="${checkout.dir}" excludes="**/${project.feature}/**" />
</copy>
<copy todir="${checkout.dir}/${project.feature}/build/features/${project.feature}">
<fileset dir="${checkout.dir}/${project.feature}" excludes="**/build/**" />
</copy>
</target>
<!-- this target is being used by other build scripts, do not change -->
<target name="checkout">
<svn>
<checkout url="${svn.url.dm}/com.buglabs.dragonfly.dm" destPath="${checkout.dir}/com.buglabs.dragonfly.dm" />
<checkout url="${svn.url.dm}/com.buglabs.dragonfly.dm.feature" destPath="${checkout.dir}/com.buglabs.dragonfly.dm.feature" />
<checkout url="${svn.url.dragonfly}/com.buglabs.dragonfly" destPath="${checkout.dir}/com.buglabs.dragonfly" />
<checkout url="${svn.url.dragonfly}/com.buglabs.dragonfly.simulator" destPath="${checkout.dir}/com.buglabs.dragonfly.simulator" />
<checkout url="${svn.url.dragonfly}/com.buglabs.dragonfly.felix" destPath="${checkout.dir}/com.buglabs.dragonfly.felix" />
<checkout url="${svn.url.dragonfly}/com.buglabs.dragonfly.feature" destPath="${checkout.dir}/com.buglabs.dragonfly.feature" />
<checkout url="${svn.url.dragonfly}/com.buglabs.dragonfly.generators" destPath="${checkout.dir}/com.buglabs.dragonfly.generators" />
<checkout url="${svn.url.dragonfly}/com.buglabs.dragonfly.ui" destPath="${checkout.dir}/com.buglabs.dragonfly.ui" />
<checkout url="${svn.url.dragonfly}/com.buglabs.dragonfly.updatesite" destPath="${checkout.dir}/com.buglabs.dragonfly.updatesite" />
<checkout url="${svn.url.dragonfly}/com.buglabs.dragonfly.help" destPath="${checkout.dir}/com.buglabs.dragonfly.help" />
<checkout url="${svn.url.bug}/com.buglabs.common" destPath="${checkout.dir}/com.buglabs.common" />
</svn>
</target>
<target name="build" depends="clean,setup,fetch.dependencies">
<echo message="###############" />
<echo message="Building ${project.feature}..." />
<echo message="###############" />
<!-- check if eclipse binary exists, if it does, copy to tmp otherwise get it -->
<if>
<and>
<isset property="eclipse.file" />
<available file="${eclipse.file}" type="file" />
</and>
<then>
<echo message="${eclipse.file} exists, copying..." />
<copy tofile="${checkout.dir}/com.eclipse.sdk/eclipse-lin.tar.gz">
<fileset file="${eclipse.file}" />
</copy>
</then>
<elseif>
<available file="${eclipse.default.file}" type="file" />
<then>
<echo message="${eclipse.default.file} exists, copying..." />
<copy tofile="${checkout.dir}/com.eclipse.sdk/eclipse-lin.tar.gz">
<fileset file="${eclipse.default.file}" />
</copy>
</then>
</elseif>
<else>
<echo message="Unable to find ${eclipse.file} or ${eclipse.default.file}, please add files or update the eclipse.file property" />
</else>
</if>
<exec dir="${checkout.dir}/com.eclipse.sdk" executable="tar">
<arg line="xfzv eclipse-lin.tar.gz" />
</exec>
<!-- Call the target that does everything -->
<ant antfile="build.xml" target="bundles.all" dir="${checkout.dir}/${project.feature}" />
</target>
<!--
this target is called by default in the script. When building from com.buglabs.sdk.xml call build target so that that script will generate appropriate
file names
-->
<target name="publish" depends="build">
<echo message="Publishing ${meta.project}..." />
<mkdir dir="${base.build.dir}/artifacts/${build.level}/${meta.project}/${build.label}" />
<copy todir="${base.build.dir}/artifacts/${build.level}/${meta.project}/${build.label}">
<fileset dir="${checkout.dir}/${project.feature}/dist" />
</copy>
<exec dir="${base.build.dir}/artifacts/${build.level}/${meta.project}/" executable="rm">
<arg line="current" />
</exec>
<symlink link="${base.build.dir}/artifacts/${build.level}/${meta.project}/current" resource="${base.build.dir}/artifacts/${build.level}/${meta.project}/${build.label}" />
</target>
<target name="clean">
<echo message="Deleting previous checkout directories..." />
<delete dir="${checkout.dir}" />
</target>
<target name="setup">
<echo message="Setting up checkout directories..." />
<mkdir dir="${checkout.dir}" />
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.