2

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.

Bruno Cardoso
  • 403
  • 3
  • 13

1 Answers1

1

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.

donturner
  • 17,867
  • 8
  • 59
  • 81
  • thank you for your answer, I tried with my configuration however I keep getting this (not very informative) error: `Errors occurred during the build. Errors running builder 'Integrated External Tool Builder' on project 'ePrintServices'. The file does not exist for the external tool named SVN_version. The file does not exist for the external tool named SVN_version.` – Bruno Cardoso Jun 05 '13 at 15:51
  • Got it, the `.exe` extension was missing... Windows ftl. – Bruno Cardoso Jun 05 '13 at 16:16
  • If you have found this answer useful consider upvoting it :) – donturner Jun 05 '13 at 21:30
  • I tried...=/ `Vote Up requires 15 reputation` I hope this answer help someone else who can upvote for me :D – Bruno Cardoso Jun 07 '13 at 02:59
  • @BrunoR.Cardoso, I just upvoted your question, so you can upvote answers now. – Nate Jun 22 '13 at 04:03