Extract version number from git source
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Extract version number from git source
I'm building from git and would like to extract the revision/version number from the source. Does anyone know where I can find this? grep'ing through the source yielded nothing.
I know it has to be in there somewhere. If I go to Help -> About FreeCAD it lists the version and revision number.
I know it has to be in there somewhere. If I go to Help -> About FreeCAD it lists the version and revision number.
Re: Extract version number from git source
Look for the Version.h file in ./src/Build. This file is generated when running cmake.
Re: Extract version number from git source
When running cmake we execute the Python script SubWCRef.py. For a git repository the Python class GitControl generates the build number by counting the number of commits in a branch because git doesn't offer this but gives only a hash value. Major and minor version number are taken from the file Version.h.in.
Re: Extract version number from git source
Thanks guys. I knew it had to be in there somewhere.
Re: Extract version number from git source
How can I download source code for this version installed on my ubuntu?
When I do
>> freecad -v
I get
"FreeCAD 0.13 Revision: 1370 (Git)"
thanks.
When I do
>> freecad -v
I get
"FreeCAD 0.13 Revision: 1370 (Git)"
thanks.
Re: Extract version number from git source
If you want the exact Version you can clone the git repo and check the respective commit outbasaks wrote:How can I download source code for this version installed on my ubuntu?
"FreeCAD 0.13 Revision: 1370 (Git)"
Code: Select all
git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad
git checkout `git log origin/master --oneline --reverse --format=format:%H |head -n 1370 |tail -n 1`
Last edited by shoogen on Mon Dec 03, 2012 10:45 am, edited 1 time in total.
Re: Extract version number from git source
Do you really want the source code for an old out of date version of FreeCAD?
For the current git repo master branch code
follow the instructions here
https://sourceforge.net/apps/mediawiki/ ... pileOnUnix
My version data from git master branch
OS: Ubuntu 12.04.1 LTS
Platform: 64-bit
Version: 0.13.1713 (Git)
Branch: master
Hash: 6dddb653d38f8367934243f539c3da714baf7a27
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
For the current git repo master branch code
Code: Select all
git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad
https://sourceforge.net/apps/mediawiki/ ... pileOnUnix
My version data from git master branch
OS: Ubuntu 12.04.1 LTS
Platform: 64-bit
Version: 0.13.1713 (Git)
Branch: master
Hash: 6dddb653d38f8367934243f539c3da714baf7a27
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.5.0
Re: Extract version number from git source
Thanks guys. Is the git server down?
When I do
>> git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad
I get
free-cad.git.sourceforge.net[0: 216.34.181.91]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
Can someone please give it a try? However, I the server responds to ping.
When I do
>> git clone git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad freecad
I get
free-cad.git.sourceforge.net[0: 216.34.181.91]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
Can someone please give it a try? However, I the server responds to ping.
Re: Extract version number from git source
I just did 5 minutes ago without trouble. I suggest you try again, maybe the problem was temporary.
Re: Extract version number from git source
Still not working for me. Same error code.