Build number in module version

I worked out some improvements to the SDK’s build.xml files to automate updating the build # in the module.xml version property. Start by obtaining the XMLTask from SourceForge and place it in ./IgnitionSDK/Build/AntLib/

Patch ./IgnitionSDK/Build/build.xml like so:

[code]— build.xml.orig 2014-12-17 10:44:36.000000000 -0500
+++ build.xml 2015-02-27 11:34:08.139812291 -0500
@@ -13,6 +13,9 @@

@@ -24,6 +27,7 @@

<tstamp>
	<format property="build.date" pattern="MM/dd/yyyy hh:mm aa" />
  •   <format property="build.tstamp" pattern="yyyyMMddHH" timezone="UTC" />
    
    [/code]

Then patch your module’s own build.xml file like so:

[code]— build.xml.orig 2015-02-27 12:00:50.192790822 -0500
+++ build.xml 2015-02-27 11:25:58.272631673 -0500
@@ -7,6 +7,11 @@

  •   <!-- Fix up the module properties file before importing -->
    
  •   <xmltask source="${project}/Build/module.xml" dest="${project}/Build/module.xml">
    
  •           <replace path="//module/version/text()" withText="0.9.0.${build.tstamp}"/>
    
  •   </xmltask>
    
  •   <!-- Loads entries from the module xml file to get the module id, name and description. 
              These entries are used as properties throughout the rest of this file and are of
              the format 'module.name' (such as for the module's name). -->[/code]
    

Once in place, update the base version number in your build.xml in the withText attribute above. Enjoy!

Nice work :thumb_left:

For you and others starting new projects: we’ve completely ditched the ant-based build for the SDK and moved to Maven. Check out the examples at github.com/inductiveautomation/ … k-examples to see how it works.

. . . mumble mumble . . . young whippersnappers . . . mumble . . . lawn . . . :slight_smile:

But seriously, thanks for the pointer. I knew y’all were doing this but hadn’t seen the WIP. Time for us old fogeys to learn Maven.

Haha, if the actual young whippersnappers had their way the whole thing would be Gradle based, which seems to be the trendy new build system.