2

How do I add an auto-incremented build number into an about screen?

By that I mean I want part of my version number auto-generated e.g. v2.2.0018 where "v2.2" is manually decided and "0018" is based on the number of check-ins in github, or other metric. I'm not fussed if it's specifically check-ins or whatever, just important that I can uniquely identify that build for support and issue reproduction purposes. And strongly prefer to have a simple incremental integer rather than a hash.

I'm using Meteor + Webstorm + Github + Heroku. I'm building web + ios + android apps off the same codebase.

Thanks.

Alveoli
  • 1,202
  • 17
  • 29
  • Perhaps get your commits count from github and tally from that? I would do this with a variable in my code, simple. Regardless I'm thinking you want to reference githubs api server-side on deployment and make your version number from there. https://developer.github.com/v3/ – below9k Jun 04 '15 at 15:27
  • Hmm, I could get the *latest* commit count from github, but how would my app instance know which commit it was from? I'm thinking that something HAS to be written into it at build time. – Alveoli Jun 04 '15 at 18:17
  • Ah that's a fair point. I was assuming each commit would be an addition to the app, but I have no idea how your production process works. Maybe tagging on your commits to narrow the selection/count to only relevant commits? At that point you might as well just have a version var :( -- I'm still interested in what other people might come with though. – below9k Jun 04 '15 at 20:46

1 Answers1

0

Unfortunately you will have to roll your own solution.

See the selected answer for a possible solution: How can I place my Meteor apps version number in the UI?

Community
  • 1
  • 1
Jacques
  • 747
  • 1
  • 8
  • 19