Commit Graph

8 Commits

Author SHA1 Message Date
Wayne Stambaugh fd54d394bd Version string improvements.
Define empty string variable KICAD_BRANCH_NAME that can be used as an
optional version string element.  When git is used to build the version
string, this variable is set to the git branch name.  It can also be
defined at configuration time as an optional string appended to the
$KICAD_VERSION variable.

Define empty string variable KICAD_VERSION_EXTRA that can be set by
the user at configuration.

The variables KICAD_BRANCH_NAME and KICAD_VERSION_EXTRA are only
appended to KICAD_VERSION if they are set.  Otherwise, only KICAD_VERSION
is uses as the version string.

Update the developer building from source document to reflect the changes.
2016-11-25 09:09:10 -05:00
Chris Pavlina 7e3c0258aa Fix KICAD_BUILD_VERSION build option 2016-11-12 15:37:01 -05:00
Wayne Stambaugh 03da56a9b5 Minor version string generation improvements.
Remove the KICAD_REPO_NAME option from the main cmake file and the
generated config.h file since it is no longer used.

Set the default branch name to "undefined" in CreateGitVersionHeader.cmake
instead of the KICAD_REPO_NAME option.

Remove generating KICAD_FULL_VERSION from CreateGitVersionHeader.cmake
and add it to WriteVersionHeader.cmake so that the default settings and
the new KiCadVersion.cmake definitions can be used to generate the full
version string as well.

Check to see if the branch name is set and only use the version to
generate the full version string.  This allows the use of the KiCad
version cmake file to create a version only string like "4.0.4" with
no trailing branch name.

Change build_version.cpp to use the full version string rather than
concatenating the version and branch strings.
2016-10-12 20:29:46 -04:00
Chris Pavlina 47772e7ae3 cmake: rewrite version header when branch changes
Before, only KICAD_BUILD_VERSION, which includes the hash but not the
branch, was compared when deciding whether to regenerate
kicad_build_version.h. This header also contains the branch name though,
so we should compare both to address the case of two branches pointing
at the same commit.
2016-09-25 10:31:30 -04:00
Chris Pavlina 7318238daa Update version string formatting after git migration
It is no longer necessary (or sensible) to include a simulated bzr
revision number, and we can reliably get a branch name now. Therefore,
the new version strings look like:

(2016-08-26 revision 67230ac)-master
 |                   |        |
 |                   |        branch name, "HEAD" if not on a branch,
 |                   |          or "unknown" if no .git present
 |                   |
 |                   abbreviated commit hash, or no-git if no .git
 |                     present
 |
 date of commit, or date of build if no .git present

Signed-off-by: Chris Pavlina <pavlina.chris@gmail.com>
2016-09-09 20:19:54 -04:00
Wayne Stambaugh 463b8b4127 Revert changes to CreateGitVersionHeader.cmake that were causing configuration issues. 2015-09-14 08:45:25 -04:00
Joseph Chen c890abe08a Improve git generated KiCad version string. 2015-09-13 14:04:40 -04:00
Nick Østergaard af1f3c9b49 Add git build version header support.
* Add CreateGitVersionHeader.cmake to extract git version information to create the kicad version
  header.
* Add check for .git folder in source path to trigger git version CMake macro.
2015-07-12 20:06:50 -04:00