Search code examples
svnblackberryblackberry-10

Pass the svn version number to the bar file


How can I pass the svnversion command output to the buildnum file?

Ok, I know I can pipe the output to it, but how can I integrate this in the QNX Momentics build process? So when I click "Build" it does this automatically for me.


Solution

  • You can execute any program in your build process by adding a new 'Builder'. Do this by going to Project->Properties->Builders.

    Click on 'New' to create a new Builder and add in the path to your program. I don't use SVN so I'm using /bin/echo with 123 as the argument (this will be my build number).

    enter image description here

    Now go to the Build Options tab and specify the path to the buildnum file. This will pipe the output from your program into buildnum.

    enter image description here

    Ensure your new builder is first in the list of builders.

    enter image description here

    Now when you build your project your program will be run first and buildnum should be populated with your desired build number. Happy days.