source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/docs/manual/CoreTasks/buildnumber.html@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 1.7 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Language" content="en-us">
5<title>BuildNumber Task</title>
6<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
7</head>
8
9<body>
10
11<h2><a name="buildnumber">BuildNumber</a></h2>
12<h3>Description</h3>
13<p>This is a basic task that can be used to track build numbers.</p>
14<p>It will first attempt to read a build number from a file (by default,
15<code>build.number</code> in the current directory), then
16set the property <code>build.number</code> to the value that was read in
17(or to <code>0</code>, if no such value). It will then increment the
18number by one and write it back out to the file.
19(See the
20<a href="../OptionalTasks/propertyfile.html">PropertyFile</a> task
21if you need finer control over things such as the property name or
22the number format.)
23</p>
24
25<h3>Parameters</h3>
26<table border="1" cellpadding="2" cellspacing="0">
27 <tr>
28 <td valign="top"><b>Attribute</b></td>
29 <td valign="top"><b>Description</b></td>
30 <td align="center" valign="top"><b>Required</b></td>
31 </tr>
32 <tr>
33 <td valign="top">file</td>
34 <td valign="top">The file to read and write the build number from/to.</td>
35 <td align="center" valign="top">No; defaults to &quot;build.number&quot;</td>
36 </tr>
37</table>
38
39<h3>Examples</h3>
40<blockquote><pre>
41&lt;buildnumber/&gt;
42</pre></blockquote>
43
44<p>Read, increment, and write a build number to the default file,
45<code>build.number</code>.</p>
46
47<blockquote><pre>
48&lt;buildnumber file=&quot;mybuild.number&quot;/&gt;
49</pre></blockquote>
50
51<p>Read, increment, and write a build number to the file
52<code>mybuild.number</code>.</p>
53
54<hr><p align="center">Copyright &copy; 2002,2004-2005 The Apache Software Foundation.
55All rights Reserved.</p>
56
57</body>
58</html>
59
Note: See TracBrowser for help on using the repository browser.