Jump to content

Archived

This topic is now archived and is closed to further replies.

448191

Phing: building a list of sub directories

Recommended Posts

I'm hoping someone with more experience with Phing than I have is going to tell that this is available functionality in Phing :)

 

I sure can't find it in the docs though.

 

What I want to do is this (note the comment):

 

<if>
<or>
	<available file="${project.root}/trunk" type="dir"/>
	<available file="${project.root}/tags" type="dir" />
	<available file="${project.root}/branches" type="dir"/>
</or>
<then>
	<input propertyname="svnChoice" validargs="trunk,tags,branches" message="Which would you like to use?"/>

	<if>
		<not><equals arg1="${svnChoice}" arg2="trunk" /></not>
		<then>
			<echo msg="Scanning for for available tags/branches"/>

			<!-- Somehow build a flat list of subdirs in ${project.root}/${svnChoice} 
				and bind it to property ${subDirs} -->

			<input propertyname="build.sourcedir" validargs="${subDirs}" message="Please make a choice from available ${svnChoice}:"/>
		</then>
	</if>				
</then>
</if>

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.