read

In a previous post Using ANT to Automate a Build Version Number I talk about incrementing build numbers using ANT. I found this particularly useful when building Mura plugins. Thanks to Steve Good for pointing out a little issue where if you wish to use the build number in naming your ZIP file, my example is incomplete. So to pull in the build number as a property so that you can include it in the ZIP file’s name, you would need to tell ANT to load the property file and read in the properties like so.

<property file="build.properties" />
<zip destfile="${sourceDir}\HelloPlugin-${buildNumber}.zip" basedir="${buildDir}" />

The ${buildNumber} portion gets the value from the build.properties file and uses it as part of the filename. Good catch Steve!

Blog Logo

Adam Presley


Published

Image

Adam.Blog()

Adam Presley's blog

Back to Overview