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.4 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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><a name="buildnumber">BuildNumber</a></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,
  26. <code>build.number</code> in the current directory), then
  27. set the property <code>build.number</code> to the value that was read in
  28. (or to <code>0</code>, if no such value). It will then increment the
  29. number by one and write it back out to the file.
  30. (See the
  31. <a href="../OptionalTasks/propertyfile.html">PropertyFile</a> task
  32. if you need finer control over things such as the property name or
  33. the number format.)
  34. </p>
  35. <h3>Parameters</h3>
  36. <table border="1" cellpadding="2" cellspacing="0">
  37. <tr>
  38. <td valign="top"><b>Attribute</b></td>
  39. <td valign="top"><b>Description</b></td>
  40. <td align="center" valign="top"><b>Required</b></td>
  41. </tr>
  42. <tr>
  43. <td valign="top">file</td>
  44. <td valign="top">The file to read and write the build number from/to.</td>
  45. <td align="center" valign="top">No; defaults to &quot;build.number&quot;</td>
  46. </tr>
  47. </table>
  48. <h3>Examples</h3>
  49. <blockquote><pre>
  50. &lt;buildnumber/&gt;
  51. </pre></blockquote>
  52. <p>Read, increment, and write a build number to the default file,
  53. <code>build.number</code>.</p>
  54. <blockquote><pre>
  55. &lt;buildnumber file=&quot;mybuild.number&quot;/&gt;
  56. </pre></blockquote>
  57. <p>Read, increment, and write a build number to the file
  58. <code>mybuild.number</code>.</p>
  59. </body>
  60. </html>