Hi Larry,

Thanks for this info and it is very helpful.  We are just now working on
our Windows installation process and have many questions, especially
relating to StarTeam, so it was very nice to hear from a current user.
Your script - target name="buildmanifest" - refers to an .exe and an
.xml file that I am not familiar with, and we need to produce a manifest
of members used in the build.  Does this provide StarTeam "version"
information, and, if so, where can I get this?  Again, thanks for your
response and help!!!

Steve 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Larry
Wanzer
Sent: Wednesday, July 19, 2006 3:35 PM
To: nant-users@lists.sourceforge.net
Subject: Re: [NAnt-users] NAnt and StarTeam

We currently use NAnt with StarTeam.  Here's our NAnt file 

 
<?xml version="1.0" encoding="UTF-8"?>



    <property name="checkin" value="true" />
    <property name="label" value="true" />
    <property name="current.directory"
value="${directory::get-current-directory()}" />
    <property name="assembly.name" value="Prism.exe" />
    <property name="assembly" value="release/${assembly.name}" />
    <property name="starteam.command.path" value="C:/Program
Files/Borland/StarTeam 6.0/stcmd.exe" />
    <property name="starteam.user" value="user" />
    <property name="starteam.password" value="password" />
    <property name="starteam.server" value="eadmv01:49205" />
    <property name="starteam.project" value="MapsGeneral" />
    <property name="starteam.url"
value="${starteam.user}:[EMAIL PROTECTED]/${starte
am.project}/Sources/Maps" />

    <target name="deleteSource" description="Clean out client bin
directory">
    
        <echo message="Cleaning out client bin directory" />
        
        <delete>
            <fileset>
                <include name="${current.directory}/bin/client/*.*" />
            </fileset>
        </delete>
    
    </target>
    
    <target name="buildclient" description="Build MAPS Application in
release mode" depends="deleteSource">
        
        <echo message="Building MAPS Application in release mode..." />
        
        <nant buildfile="MAPSDeploy.Build" />
        
    </target>
    
    <target name="getbuildversion" description="Get version of MAPS
assembly" depends="buildclient">
    
        <echo message="Getting MAPS Assembly build version number..." />
        
        <property name="assembly.version"
value="${assemblyname::get-version(assemblyname::get-assembly-name(assem
bly))}" />
        
        <echo message="Assembly build version number:
${assembly.version}" />
    
    </target>
    
    <target name="buildmanifest" description="Execute MAPSMigrate to
build ServerManifest.xml file" depends="getbuildversion">
    
        <echo message="Building server manifest file for
Bootstrapper..." />
        
        <exec program="${current.directory}/lib/MAPSMigrate.exe"
basedir="${current.directory}/lib"
workingdir="${current.directory}/lib">
            <arg value="${assembly.version}" />
            <arg
value="${current.directory}/bin/client/configs/ServerManifest.xml" />
            <arg value="${current.directory}/release" />
        </exec>
    
    </target>
    
    <target name="copyclientfiles" description="Copy client files to
bin" depends="buildmanifest">

        <copy todir="bin/client" overwrite="true">
            <fileset basedir="release/">
                <include name="*.dll" />
                <include name="*.exe" />
            </fileset>
        </copy>
    
    </target>
    
    <target name="checkinclientfiles" description="Check client files
into StarTeam" depends="copyclientfiles">

        <if test="${checkin}">
            <echo message="Checking client files into StarTeam..." />
        
            <exec program="${starteam.command.path}"
workingdir="${current.directory}\bin\client">
                <arg value="ci" />
                <arg value="-p" />
                <arg value="${starteam.url}/bin/client" />
                <arg value="-u" />
                <arg value="-o" />
                <arg value='-r "New build - ${assembly.version}"' />
                <arg value="*.*" />
            </exec>
            
            <exec program="${starteam.command.path}"
workingdir="${current.directory}\bin\client\configs">
                <arg value="ci" />
                <arg value="-p" />
                <arg value="${starteam.url}/bin/client/configs" />
                <arg value="-u" />
                <arg value="-o" />
                <arg value='-r "New build - ${assembly.version}"' />
                <arg value="*.xml" />
            </exec>
        </if>
        
        <ifnot test="${checkin}">
            <echo message="StarTeam client file checkin was bypassed..."
/>
        </ifnot>
        
    </target>
    
    <target name="checkinserverfiles" description="Check server files
into StarTeam" depends="checkinclientfiles">

        <if test="${checkin}">
            <echo message="Checking server files into StarTeam..." />
        
            <exec program="${starteam.command.path}"
workingdir="${current.directory}\bin\server">
                <arg value="ci" />
                <arg value="-p" />
                <arg value="${starteam.url}/bin/server" />
                <arg value="-u" />
                <arg value="-o" />
                <arg value='-r "New build - ${assembly.version}"' />
                <arg value="*.*" />
            </exec>
        </if>
        
        <ifnot test="${checkin}">
            <echo message="StarTeam server file checkin was bypassed..."
/>
        </ifnot>
        
    </target>
    
    <target name="labelbuild" description="Label with current build
number" depends="checkinserverfiles">
    
        <if test="${label}">
            <echo message="Labelling /sources with latest build number -
${assembly.version}..." />
        
            <exec program="${starteam.command.path}"
workingdir="${current.directory}">
                <arg value="label" />
                <arg value="-p" />
                <arg value="${starteam.url}" />
                <arg value="-nl" />
                <arg value="${assembly.version}" />
                <arg value="-x" />
            </exec>
        </if>
        
        <ifnot test="${label}">
            <echo message="Labelling bypassed for build -
${assembly.version}..." />
        </ifnot>
        
    </target>
    
</project>


------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT Join
SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to