ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Les Hughes <leslie.hug...@rubus.com>
Subject RE: Perforce tasks
Date Fri, 21 Jun 2002 09:42:30 GMT
Hi,

Thanks for you feedback. Can you submit a patch for the documentation to
ant-dev?

As for changing p4counter - well, the perms required to update counters in
perforce are quiet "powerful". Since these grant a whole bunch of perms, I
haven't actually found the counter to be of much use. Have you seen the
counter task? I'd rather use this with a p4edit and p4submit to keep the
build number in a file. The other way is to use the script task and do
something like

<target name="label">
<p4counter name="buildnumber" property="p4.build.count"/>
<script language="javascript">
<![CDATA[
var count;
count = parseInt(label.getProject().getProperty("p4.build.count"));
if(isNaN(count)) count =0;
label.getProject().setProperty("p4.build.count",++count);
]]>
</script>
<p4counter name="buildnumber" value="${p4.build.count}"/>

But anyway, feel free to change the code - it's not mine anymore, it's
everybodies/anybodies - and submit a patch to ant-dev.

Oh and BTW, this'll probably open up the mutable properties can of worms
again ;-)


Bye,

Les
PS. Again, I dont mind answering direct but could you keep you mails to
ant-dev or ant-user? That way they get into the archive and everyone
benefits. Ta.




-----Original Message-----
From: MARZIOU,GAEL (HP-France,ex1)
To: leslie.hughes@rubus.com; kirk@radik.com
Sent: 6/21/02 10:29 AM
Subject: Perforce tasks

Hi Les and Kirk,

First, let me thank you for developing the Perforce ant tasks.

I found an error in p4counter documentation, last example is wrong:

<p4counter name="last-clean-build" property="${p4.last.clean.build}" />

Property should contain the name of property and not its value, so it
should
be:

<p4counter name="last-clean-build" property="p4.last.clean.build" />

I need a new feature for p4counter, possibility to increment a counter,
I
have thought of adding a new attribute "increment":

<p4counter name="last-clean-build" increment="1" />

would increment last-clean-build counter by 1

<p4counter name="last-clean-build" increment="1"
property="p4.last.clean.build" />

would increment last-clean-build counter by 1 and set the property with
updated value.

What do you think of this feature?

I was planning to implement it myself but I would like to know if you
would
agree to include it in official release.
Or maybe there is a simpler solution that could be implemented using
another
ant task.

Thanks,

Gael Marziou

--
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