View Issue Details

IDProjectCategoryView StatusLast Update
0000628FreeCADBugpublic2012-03-28 18:57
Reporterdjreichel Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.12 
Target VersionFixed in Version0.13 
Summary0000628: git repo is not providing build revision number
Descriptioncat 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 InformationIn the svn repository revision number was provided.
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2012-03-08 07:05

administrator   ~0001724

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.

yorik

2012-03-28 17:01

administrator   ~0001828

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?

Issue History

Date Modified Username Field Change
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