Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Posts: 3
Registered: ‎10-14-2010
My Device: Not Specified

How to auto-increment buildnum?

[ Edited ]

I used the option to exertnalize the build id of the bar-descriptor.  I assumed that this would auto-increment, but that is not the case.

 

Adding extra info that I am using Momentics.

 

Anyone know how I can now make this file auto-increment the build id?

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to auto-increment buildnum?

[ Edited ]

You don't mention specifically whether you're using Momentics for this or not. For command line use, at any rate, you can modify your bar-descriptor.xml file to contain <buildIdFile>_buildId</buildIdFile> where "_buildId" is any filename, and prepopulate the file with a number (e.g. 0). Then any time you run blackberry-deploy with that bar-descriptor file, it will use the current build number, then autoincrement it in the specified file for next time.

Momentics can use this as well, though I don't recall how, off-hand.

 

Edited: OP modified his post after my original reply.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Highlighted
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to auto-increment buildnum?

So check on the Source tab when editing the bar-descriptor.xml file. Does it show either <buildId>1</buildId> (with some integer there, maybe 1) or <buildIdFile>buildnum</buildIdFile> ?

If it shows <buildId> with the integer, look back on the General tab, and there should be a link at the end of the list under Related Settings and Actions. It reads either "Use build number file" (if you're using <buildId> right now) or "Use internal build number"... click it to switch to the one you want.

I wrote that partly for others who don't know where the setting is. It sounds like you already know about this, and have switched to the build number file but it's not working.

I rarely use Momentics so I'll have to leave troubleshooting that to others who know more about this feature.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!