Jump to content

Phing: building a list of sub directories


448191

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>

Link to comment
Share on other sites

  • 3 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.