Вы находитесь на странице: 1из 6

<?xml version="1.0"?

>
<project name="pcgui_client" default="start">
<description>the pcgui build files.</description>
<include buildfile="pcgui.build.properties"/>
<tstamp property="xdate" pattern="mmm-dd-yyyy" />
<tstamp property="month" pattern="mm" />
<property name="perl.executable" value="c:\perl\bin\perl.exe" />
<property name="devenv.executable" value="devenv" />
<property name="assembly.version" value="${harvest.package}.0.0" />
<if test="${string::get-length(harvest.package) == 5}">
<property name="assembly.version" value="${harvest.package}.0" />
</if>
<if test="${buildtype == 'level'}">
<property name="harveststate" value="build" />
<property name="archive_path" value="${harvest.project}.${harvest.package}"
/>
</if>
<if test="${buildtype == 'daily'}">
<property name="harveststate" value="development" />
<property name="archive_path" value="${harvest.project}.${xdate}" />
</if>
<property name="assembly.info.version"
value="${string::replace(harvest.project, '.client', '')}" />
<property name="temp_prod" value="${string::replace(assembly.info.version,
'.', '')}" />
<property name="temp_prod_version" value="${string::replace(harvest.package,
'.', '_')}" />
<property name="prod_name" value="${temp_prod}_${temp_prod_version}" />
<echo message="prod_name is ${prod_name}" />

<target name="start">
<call target="buildproductversion" />
<call target="buildversionnumber" />
<call target="setworkdir" />
<call target="checkout" />
<call target="copyfiles" />
<call target="setupassemblyinfo" />
<call target="updateguid" />
<call target="editfiles" />
<call target="build" />
<call target="mail" />
</target>

<target name="buildproductversion">
<property name="pvbug" value="${string::replace(harvest.package, '.', '')}" />
<property name="product.version" value="${pvmm}.${string::pad-right(pvbug, 4,
'0')}" />
</target>

<target name="buildversionnumber">
<property name="project.year" value="${string::substring(harvest.project, 0
,4)}" />
<property name="project.month" value="${string::substring(harvest.project, 8
,3)}" />
<if test="${string::substring(harvest.project, 6 ,1) == '.'}">
<property name="project.month" value="${string::substring(harvest.project, 7
,3)}" />
</if>
<echo message="project month is ${project.month}" />
<if test="${project.month == 'jan'}">
<property name="project.month" value="01"/>
</if>
<if test="${project.month == 'feb'}">
<property name="project.month" value="02"/>
</if>
<if test="${project.month == 'mar'}">
<property name="project.month" value="03"/>
</if>
<if test="${project.month == 'apr'}">
<property name="project.month" value="04"/>
</if>
<if test="${project.month == 'may'}">
<property name="project.month" value="05"/>
</if>
<if test="${project.month == 'jun'}">
<property name="project.month" value="06"/>
</if>
<if test="${project.month == 'jul'}">
<property name="project.month" value="07"/>
</if>
<if test="${project.month == 'aug'}">
<property name="project.month" value="08"/>
</if>
<if test="${project.month == 'sep'}">
<property name="project.month" value="09"/>
</if>
<if test="${project.month == 'oct'}">
<property name="project.month" value="10"/>
</if>
<if test="${project.month == 'nov'}">
<property name="project.month" value="11"/>
</if>
<if test="${project.month == 'dec'}">
<property name="project.month" value="12"/>
</if>
<!-- get package number and determine number of chars. if equal 3, append .0
to it, else go with it -->
<property name="vernum"
value="${project.year}${project.month}.${harvest.package}.0" />
<if test="${string::get-length(harvest.package) >= 4}">
<property name="vernum"
value="${project.year}${project.month}.${harvest.package}" />
</if>
</target>

<target name="setworkdir">
<property name="workdir"
value="${builddir}\${harvest.project}.${harvest.package}" />
<if test="${buildtype != 'level'}">
<property name="workdir" value="${builddir}\${harvest.project}.${xdate}" />
</if>
</target>

<target name="checkout">
<delete dir="${workdir}" failonerror="false" />
<mkdir dir="${workdir}" failonerror="true" />
<exec program="hco"
commandline="-b ${harvest.broker} -usr ${harvest.user} -pw
${harvest.password} -en ${harvest.project} -st ${harveststate} -vp
${harvest.viewpath} -r -op pc -s * -sy "
workingdir="${workdir}" />
failonerror="true" />
</target>

<target name="copyfiles">
<copy file="${workdir}\src\client\utilities\startros\app.config"
tofile="${workdir}\src\client\utilities\startros\rosframework.config"/>

</target>

<target name="setupassemblyinfo">
<copy file="h:\scripts\assemblyinfo.cs.template"
tofile="${workdir}\assemblyinfo.cs" />
<exec program="${perl.executable}"
commandline="xmodifyfiles.pl jxzq ${assembly.version} --g
${workdir}/assemblyinfo.cs"
failonerror="true" />
<exec program="${perl.executable}"
commandline="xmodifyfiles.pl qzxj ${assembly.info.version} --g
${workdir}/assemblyinfo.cs"
failonerror="true" />

<attrib file="${workdir}\src\client\rosscreens\assemblyinfo.cs"
readonly="false" />
<copy file="${workdir}\assemblyinfo.cs"
tofile="${workdir}\src\client\rosscreens\assemblyinfo.cs" />

<attrib
file="${workdir}\src\client\utilities\soaptraceextension\assemblyinfo.cs"
readonly="false" />
<copy file="${workdir}\assemblyinfo.cs"
tofile="${workdir}\src\client\utilities\soaptraceextension\assemblyinfo.cs" />

<attrib file="${workdir}\src\client\componenttest\assemblyinfo.cs"
readonly="false" />
<copy file="${workdir}\assemblyinfo.cs"
tofile="${workdir}\src\client\componenttest\assemblyinfo.cs" />

<attrib file="${workdir}\src\client\rosutilities\assemblyinfo.cs"
readonly="false" />
<copy file="${workdir}\assemblyinfo.cs"
tofile="${workdir}\src\client\rosutilities\assemblyinfo.cs" />

<attrib
file="${workdir}\src\client\webservicescommunicationmanagement\assemblyinfo.cs"
readonly="false" />
<copy file="${workdir}\assemblyinfo.cs"
tofile="${workdir}\src\client\webservicescommunicationmanagement\assemblyinfo.cs"
/>

<attrib file="${workdir}\src\client\rosframework\assemblyinfo.cs"
readonly="false" />
<copy file="${workdir}\assemblyinfo.cs"
tofile="${workdir}\src\client\rosframework\assemblyinfo.cs" />

<attrib
file="${workdir}\src\client\rosframework\bus.services\assemblyinfo.cs"
readonly="false" />
<copy file="${workdir}\assemblyinfo.cs"
tofile="${workdir}\src\client\rosframework\bus.services\assemblyinfo.cs" />

<attrib file="${workdir}\src\client\standardcontrols\assemblyinfo.cs"
readonly="false" />
<copy file="${workdir}\assemblyinfo.cs"
tofile="${workdir}\src\client\standardcontrols\assemblyinfo.cs" />
<attrib
file="${workdir}\src\client\utilities\rosinstaller\rosinstaller.vdproj"
readonly="false" />
</target>

<target name="updateguid">
<property name="product.guid" value="" />
<property name="package.guid" value="" />
<script language="c#">
<code><![cdata[

public static void scriptmain(project project)


{
guid guid = guid.newguid();
project.properties["product.guid"] = "{" + guid.tostring().toupper() +
"}";
}

]]></code>
</script>

<script language="c#">
<code><![cdata[

public static void scriptmain(project project)


{
guid guid = guid.newguid();
project.properties["package.guid"] = "{" + guid.tostring().toupper() +
"}";
}

]]></code>
</script>
<echo message="product guid is ${product.guid}|" />
<echo message="package guid is ${package.guid}|" />
</target>

<target name="editfiles">
<attrib
file="${workdir}\src\client\rosframework\services\configuration\configurationmanag
er\configurationmanager.xml" readonly="false" />
<attrib
file="${workdir}\src\client\utilities\contactcenterlog\obj\release\contactcenterlo
g.exe" readonly="false" />
<xmlpoke
file="${workdir}\src\client\rosframework\services\configuration\configurationmanag
er\configurationmanager.xml"
value="c:\program files\ros\${vernum}\staticdata.xml"
xpath="configuration/general/release/staticdatadirectory">
</xmlpoke>
<xmlpoke
file="${workdir}\src\client\rosframework\services\configuration\configurationmanag
er\configurationmanager.xml"
value="c:\program files\ros\${vernum}\rosscreens.dll"
xpath="configuration/general/release/screensassemblylocation">
</xmlpoke>
<attrib file="${workdir}\src\client\utilities\startros\rosframework.config"
readonly="false" />
<xmlpoke file="${workdir}\src\client\utilities\startros\rosframework.config"
value="c:\program files\ros\${vernum}\configurationmanager.xml"
xpath="configuration/appsettings/add[@key =
'configurationmanagerxmllocation']/@value">
</xmlpoke>
<attrib file="${workdir}\src\client\utilities\rosclientstart.config"
readonly="false" />
<xmlpoke file="${workdir}\src\client\utilities\rosclientstart.config"
value="c:\program files\ros\${vernum}"

xpath="configuration/appstart/clientapplicationinfo/appfoldername">
</xmlpoke>
<xmlpoke file="${workdir}\src\client\utilities\rosclientstart.config"
value="${vernum}"

xpath="configuration/appstart/clientapplicationinfo/installedversion">
</xmlpoke>

<exec program="${perl.executable}"
commandline="xmodifyfiles.pl xxxarchive_pathyyy ${archive_path} --g
${workdir}/src/client/utilities/rosinstaller/rosinstaller.vdproj"
failonerror="true" />

<exec program="${perl.executable}"
commandline="xmodifyfiles.pl xxxprod_nameyyy ${prod_name} --g
${workdir}/src/client/utilities/rosinstaller/rosinstaller.vdproj"
failonerror="true" />

<exec program="${perl.executable}"
commandline="xmodifyfiles.pl xxxver_numyyy ${vernum} --g
${workdir}/src/client/utilities/rosinstaller/rosinstaller.vdproj"
failonerror="true" />

<exec program="${perl.executable}"
commandline="xmodifyfiles.pl xxxproductguidyyy ${product.guid} --g
${workdir}/src/client/utilities/rosinstaller/rosinstaller.vdproj"
failonerror="true" />

<exec program="${perl.executable}"
commandline="xmodifyfiles.pl xxxpackageguidyyy ${package.guid} --g
${workdir}/src/client/utilities/rosinstaller/rosinstaller.vdproj"
failonerror="true" />

<exec program="${perl.executable}"
commandline="xmodifyfiles.pl xxxproductversionyyy ${product.version} --g
${workdir}/src/client/utilities/rosinstaller/rosinstaller.vdproj"
failonerror="true" />

</target>

<target name="build">
<exec program="${devenv.executable}"
commandline='${workdir}\src\client\utilities\rosclient-installer.sln /build
release /project rosinstaller /out ${workdir}\build_log.txt'
failonerror="true"/>
<copy
file="${workdir}\src\client\utilities\rosinstaller\release\rosinstaller-
${archive_path}.msi" tofile="h:\iis webs\pc gui
web\releases\${buildtype}\rosinstaller-${archive_path}.msi" />
<if test="${buildtype == 'level'}">
<copy
file="${workdir}\src\client\utilities\rosinstaller\release\rosinstaller-
${archive_path}.msi" tofile="h:\iis webs\pc gui web\releases\${pt_1}\rosinstaller-
${archive_path}.msi" />
<copy
file="${workdir}\src\client\utilities\rosinstaller\release\rosinstaller-
${archive_path}.msi" tofile="h:\iis webs\pc gui web\releases\${pt_2}\rosinstaller-
${archive_path}.msi" />
</if>
</target>

<target name="mail">
<if test="${buildtype == 'level'}">
<mail
from="ovrturcm@bellsouth.com"

tolist="mike.decastra@bellsouth.com;ken.hollis@bellsouth.com;sathish.nallasamy@bel
lsouth.com;ezhilrasu.subramaniam@bellsouth.com;bholanath.rajwar@bellsouth.com;vine
et.panikar@bellsouth.com"
subject="${archive_path}.msi"
message="${archive_path}.msi built and copied to ${pt_1} and ${pt_2}
download areas."
mailhost=" ">
</mail>
</if>
</target>

</project>

Вам также может понравиться