You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

buildnumber.html 2.2 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Language" content="en-us">
  18. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  19. <title>BuildNumber Task</title>
  20. </head>
  21. <body>
  22. <h2 id="buildnumber">BuildNumber</h2>
  23. <h3>Description</h3>
  24. <p>This is a basic task that can be used to track build numbers.</p>
  25. <p>It will first attempt to read a build number from a file (by default, <samp>build.number</samp>
  26. in the current directory), then set the property <code>build.number</code> to the value that was
  27. read in (or to <q>0</q>, if no such value). It will then increment the number by one and write it
  28. back out to the file. (See the <a href="../Tasks/propertyfile.html">PropertyFile</a> task if you
  29. need finer control over things such as the property name or the number format.)</p>
  30. <h3>Parameters</h3>
  31. <table class="attr">
  32. <tr>
  33. <th scope="col">Attribute</th>
  34. <th scope="col">Description</th>
  35. <th scope="col">Required</th>
  36. </tr>
  37. <tr>
  38. <td>file</td>
  39. <td>The file to read and write the build number from/to.</td>
  40. <td>No; defaults to <q>build.number</q></td>
  41. </tr>
  42. </table>
  43. <h3>Examples</h3>
  44. <p>Read, increment, and write a build number to the default file, <samp>build.number</samp>.</p>
  45. <pre>&lt;buildnumber/&gt;</pre>
  46. <p>Read, increment, and write a build number to the file <samp>mybuild.number</samp>.</p>
  47. <pre>&lt;buildnumber file=&quot;mybuild.number&quot;/&gt;</pre>
  48. </body>
  49. </html>