View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000628||FreeCAD||Bug||public||2012-03-08 03:58||2012-03-28 18:57|
|Fixed in Version||0.13|
|Summary||0000628: git repo is not providing build revision number|
|Description||cat src/Build/Version.h.in |
// Version Number
#define FCVersionMajor "0"
#define FCVersionMinor "13"
#define FCVersionName "Vulcan"
// test: $Format:Hash (%H), Date: %ci$
#define FCRevision "$WCREV$" //Highest committed revision number
#define FCRevisionDate "$WCDATE$" //Date of highest committed revision
#define FCRepositoryURL "$WCURL$" //Repository URL of the working copy
|Additional Information||In the svn repository revision number was provided.|
|Tags||No tags attached.|
git doesn't offer a revision number (similar to what you expect from e.g. SVN) but it only offers hashes. And even to put this hash into a Version.h file everybody who checks out/commit the sources needs to define a hook script to update this file.
Since this is not very practical and even doesn't work on PPA (because you have no control over the import to bzr) it's not really an option for us.
So, for PPA we solved it by merging a branch with a Version.h file into the source branch at build time.
And to derive a revision like number from git we have written a python script which counts the number of commits and writes it to Version.h. To invoke the script you have to call cmake before.
However, it might also be possible to combine this python script with a hook script from git. But you have to do this locally on your machine.
Actually there is nothing we can do on this.
||It seems to me that the current system works reasonably well, the commit hashtag is sufficient to locate a particular commit... I propose to close this issue, unless anyone has more to say?|
|2012-03-08 03:58||djreichel||New Issue|
|2012-03-08 07:05||wmayer||Note Added: 0001724|
|2012-03-28 17:01||yorik||Note Added: 0001828|
|2012-03-28 18:57||wmayer||Status||new => closed|
|2012-03-28 18:57||wmayer||Resolution||open => fixed|
|2012-03-28 18:57||wmayer||Fixed in Version||=> 0.13|