20 Jun 2012 9:33 AM #1
Unanswered: displaying application version
If I like to display our company's application version number in the app, what is the best way to go about it?
In Java, people can have a Version class which can read an entry(implementation-version) in manifest file, or through some other means. In ST20, we only have a concept of cache manifest. Does ST have any API to deal with that? What would be the suggested way to go about it?
20 Jun 2012 2:29 PM #2
I realized that one can set version in app.json or package.json. Is there API can get to either of these objects?
22 Jun 2012 5:26 AM #3
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
23 Jul 2012 8:53 AM #4
I wish there was some built-in support for this, as it's very helpful to have something to tell if the user isn't getting the current version due to ST or browser problems.
23 Jul 2012 12:45 PM #5
23 Jul 2012 12:47 PM #6
No, it's not hard. You just have to keep track of it and update it by hand each time. There's already a great deal of automation involved in the build process. I'd settle for just being able to easily work with the same version that goes in the manifest.
3 Dec 2013 5:42 AM #7
Did this topic die here? We're trying to standardize our apps to have a quick/easy way to display version info about the app (like an "About" page) and would like to rely on automated version info rather than manually maintained info. Any leads anyone? Thanks.
9 May 2014 8:27 AM #8
Another thread resurrection
Some way of automating version numbering would be absolutely fantastic. I'm looking to tie our web-app and native-app builds into our continuous integration server (Jenkins). Software for other platforms automatically gets their version numbers set by values configured in the build process.
For example, for our other projects we'll have a default major and minor version specified for our builds. Each build then automatically sets the remaining parts of the version number to the Jenkins build number and SVN revision. So, a full version number looks like <major>.<minor>.<buildnumber>.<svnrevision>
Is there some way to write a hook that runs during the build process (within Cmd or Architect) which could update a variable within a js file to set the version number before the build takes place? Jenkins makes the auto-generated version available via an environment variable, so any hook would need access to that.
9 May 2014 8:33 AM #9
Hmm -- this looks promising:
Didn't realise that ant could even update the file via a regex itself!
Now, I need to find somewhere in build-impl.xml that would be a suitable place to perform the version update....