ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Close <os_mon...@yahoo.com>
Subject Re: VssGet and Labeling...
Date Fri, 09 Nov 2001 21:12:48 GMT
ok, i think this is a hack and there is a better way
out there(if you have a better way, please share it
with me).  here's what i'm doing:

<!-- some other stuff here -->

    <target name="extract" depends="prepare"> 
        <echo message="Extracting latest from VSS..."
/>
        <vssget localPath="${sourceDir}"
        recursive="true" 
        login="LocalBuild, LocalBuild"
        vsspath="/MKTG"
        ssdir="${ssDir}\win32"
        writable="false"/>
    </target>	
    
    <target name="extractLabel" depends="extract"
if="VersionLabel"> 
        <echo message="Extracting Label:
${VersionLabel} from VSS..." />
        <antcall target="prepare" />
        <vssget localPath="${sourceDir}"
        recursive="true" 
        login="LocalBuild, LocalBuild"
        vsspath="/MKTG"
        ssdir="${ssDir}\win32"
        label="${VersionLabel}"
        writable="false"/>
    </target>	

<!-- compile and jar and war, etc... -->


extract checks out the latest versions from vss. 
extractLabel checks to see if VersionLabel was passed
in.  if it was then clean up the previous check out
using the antcall and check out the labeled version. 
if VersionLabel doesn't exist skip this target.

so worst case i have to check out of VSS twice for
this build.  anyone have a better way to do the same
thing but more elegantly???

andy

--- Andrew Close <os_monkey@yahoo.com> wrote:
> Hi gang
> 
> i'm attempting to get version 1.0 from sourcesafe
> using ant 1.4.1.  this works swimmingly. :)
> i currently have my script set up so i can pass in
> the
> version label that i want to get and ant gets it for
> me.  
> 
> how do i get the latest unlabeled code out of source
> safe using this same script if i don't pass in a
> label?  it looks like VssGet checks out the latest
> 'labeled' version, not the latest piece of code.  is
> there a way to do a conditional:
> 
> if versionLabel is passed in 
>    then get labeled code
> else 
>    get latest piece of code?
> 
> here's what my source safe target looks like:
> 
> <!-- global property setting version label to null
> may
> be my problem... -->
> 
> 
> <property name="VersionLabel" value="" />
> 
> 
>     <target name="extract" depends="prepare"> 
>         <vssget localPath="${sourceDir}"
>         recursive="true" 
>         login="LocalBuild, LocalBuild"
>         vsspath="/MKTG"
>         ssdir="${ssDir}\win32"
>         label="${VersionLabel}"
>         writable="false"/>
>     </target>	
> 
> tia
> 
> andy



__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message