1 | <!--
|
---|
2 | Licensed to the Apache Software Foundation (ASF) under one or more
|
---|
3 | contributor license agreements. See the NOTICE file distributed with
|
---|
4 | this work for additional information regarding copyright ownership.
|
---|
5 | The ASF licenses this file to You under the Apache License, Version 2.0
|
---|
6 | (the "License"); you may not use this file except in compliance with
|
---|
7 | the License. You may obtain a copy of the License at
|
---|
8 |
|
---|
9 | http://www.apache.org/licenses/LICENSE-2.0
|
---|
10 |
|
---|
11 | Unless required by applicable law or agreed to in writing, software
|
---|
12 | distributed under the License is distributed on an "AS IS" BASIS,
|
---|
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
14 | See the License for the specific language governing permissions and
|
---|
15 | limitations under the License.
|
---|
16 | -->
|
---|
17 | <html>
|
---|
18 |
|
---|
19 | <head>
|
---|
20 | <meta http-equiv="Content-Language" content="en-us">
|
---|
21 | <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
---|
22 | <title>BuildNumber Task</title>
|
---|
23 | </head>
|
---|
24 |
|
---|
25 | <body>
|
---|
26 |
|
---|
27 | <h2><a name="buildnumber">BuildNumber</a></h2>
|
---|
28 | <h3>Description</h3>
|
---|
29 | <p>This is a basic task that can be used to track build numbers.</p>
|
---|
30 | <p>It will first attempt to read a build number from a file (by default,
|
---|
31 | <code>build.number</code> in the current directory), then
|
---|
32 | set the property <code>build.number</code> to the value that was read in
|
---|
33 | (or to <code>0</code>, if no such value). It will then increment the
|
---|
34 | number by one and write it back out to the file.
|
---|
35 | (See the
|
---|
36 | <a href="../OptionalTasks/propertyfile.html">PropertyFile</a> task
|
---|
37 | if you need finer control over things such as the property name or
|
---|
38 | the number format.)
|
---|
39 | </p>
|
---|
40 |
|
---|
41 | <h3>Parameters</h3>
|
---|
42 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
43 | <tr>
|
---|
44 | <td valign="top"><b>Attribute</b></td>
|
---|
45 | <td valign="top"><b>Description</b></td>
|
---|
46 | <td align="center" valign="top"><b>Required</b></td>
|
---|
47 | </tr>
|
---|
48 | <tr>
|
---|
49 | <td valign="top">file</td>
|
---|
50 | <td valign="top">The file to read and write the build number from/to.</td>
|
---|
51 | <td align="center" valign="top">No; defaults to "build.number"</td>
|
---|
52 | </tr>
|
---|
53 | </table>
|
---|
54 |
|
---|
55 | <h3>Examples</h3>
|
---|
56 | <blockquote><pre>
|
---|
57 | <buildnumber/>
|
---|
58 | </pre></blockquote>
|
---|
59 |
|
---|
60 | <p>Read, increment, and write a build number to the default file,
|
---|
61 | <code>build.number</code>.</p>
|
---|
62 |
|
---|
63 | <blockquote><pre>
|
---|
64 | <buildnumber file="mybuild.number"/>
|
---|
65 | </pre></blockquote>
|
---|
66 |
|
---|
67 | <p>Read, increment, and write a build number to the file
|
---|
68 | <code>mybuild.number</code>.</p>
|
---|
69 |
|
---|
70 |
|
---|
71 |
|
---|
72 | </body>
|
---|
73 | </html>
|
---|
74 |
|
---|