Versioning

17 views
Skip to first unread message

Shell (Aridhia Informatics)

unread,
Mar 20, 2013, 10:24:22 AM3/20/13
to choru...@googlegroups.com
Hi chaps,

I was looking at the versioning of our flavour of Open Chorus. As our ver will be based on shifting builds of OC, we potentially want version numbers along these lines:

"1.0.0 (2.3.0.0)"

In other words, our major, minor, patch (Open Chorus major, minor, servicepack, patch).

I've been looking at app/version.rb where this appears to de defined (served up as /VERSION), but any changes here do not appear to get reflected in the running app. Also, being new to Rails, unsure if this file means something in the context of rails/app preventing me from changing it. 

S.

Charles Hansen

unread,
Mar 20, 2013, 5:06:58 PM3/20/13
to choru...@googlegroups.com
Hi Shell,

The running app uses the file version_build.  You can put whatever string in there you want and that will be the version.  The version_build file is only updated when you package Chorus.  This will use app/version.rb.  version.rb isn't anything special to rails, we just use it when we reference Chorus::VERSION::STRING in lib/package_maker.rb.

Charles & Gavin



S.

--
You received this message because you are subscribed to the Google Groups "chorus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chorus-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Shell (Aridhia Informatics)

unread,
Mar 21, 2013, 10:00:46 AM3/21/13
to choru...@googlegroups.com
Hi Charles, Gavin,

Thanks for that - just what I was looking for.

S.

Shell (Aridhia Informatics)

unread,
Mar 21, 2013, 10:32:07 AM3/21/13
to choru...@googlegroups.com
This file doesn't exist, but creating it seemed to do the trick.

The follow up questions are then,

1) how do we get the partial SHA of the latest commit into the version.
2) I'm not clear from your reply whether this arbitrary version (+ SHA) is carried into the packaged product or not? We want to be able to identify builds within dev as well as production.

S.

On Wednesday, March 20, 2013 9:06:58 PM UTC, chansen wrote:

Luke Winikates

unread,
Mar 21, 2013, 2:47:13 PM3/21/13
to choru...@googlegroups.com
Hi Shell,

1) Chorus can generate the version_build file with the SHA for you. It's normally generated as part of building the installer package, but in development you can generate the file with this one-liner:

rails r "require File.expand_path('version'); PackageMaker.write_version"

2) In the Rails app, if you want to get the full version + SHA, you can call PackageMaker.version_name or you can use Chorus::VERSION::STRING in order to get the version number without the SHA. On the client side, /VERSION will return the contents of version_build if it exists, or Chorus::VERSION::STRING otherwise. 

Luke & Helge
Reply all
Reply to author
Forward
0 new messages