D8158: KDevelop: decorate patch version string in development builds

René J.V. Bertin noreply at phabricator.kde.org
Sun Oct 8 10:55:10 UTC 2017

rjvbb added inline comments.


> kfunk wrote in CMakeLists.txt:133
> Please just *amend* the version as specified by CMake (that is, re-use VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH). We don't want to fully overwrite the things set in CMakeLists.txt.
> Something along:
> Please check what Krita does in their CMakeLists.txt, I'd like something similar.
> FWIW, they use this to get the SHA1:
> `get_git_head_revision(GIT_REFSPEC GIT_SHA1)`

We're not overwriting anything, we're adding an additional full version string. That's not unheard of, this is exactly what's done in Apple's Info.plist files. A "numeric" version for use in code, and a human-readable string that is to be presented to users.

I can achieve the same thing the way Krita does things, but that's more complicated (cf. the script I used in the initial release). Sven pointed out that we cannot change VERSION_PATCH because that variable is used by dependent code.

Whatever approach I will use I find it crucial that the output from `git describe` is used. Git hashes are random, so using only them will not allow checking at a glance which of two versions is older or newer (and that's part of what I want to achieve with this patch).

> kfunk wrote in GetGitRevisionDescription.cmake:1
> This copy is not current.
> I'm getting:
>   makeobj[0]: Entering directory `/home/kfunk/devel/build/kf5/kdevelop-5.2'
>   [0/1] Re-running CMake...
>   CMake Warning at cmake/modules/GetGitRevisionDescription.cmake:121 (message):
>     " describe 8bab57d14644f7f1d2a263a243745014bce5745c " failed with exit code
>     No such file or directory, out=
>   Call Stack (most recent call first):
>     CMakeLists.txt:124 (git_describe)
> Please use the most recent version from https://github.com/rpavlik/cmake-modules/blob/master (it seems to work fine with that version from there).

Sorry, I am working against the 5.2 branch (it's not a huge change that introduces wildly different behaviour after all).

> kfunk wrote in kdevelop-fullversion.h.cmake:1
> kdevelop-fullversion.h -> kdevelop_fullversion.h. `FULLVERSION` -> `KDevelop_FULLVERSION_STRING`.
> Then this is consistent with kdevelop_version.h as generated by `ecm_setup_version()`.

Shouldn't config-kdevelop.h be made consistent too then?

  R32 KDevelop


To: rjvbb, #kdevelop, brauch, kfunk
Cc: kossebau, flherne, mwolff, brauch, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20171008/64025a6c/attachment.html>

More information about the KDevelop-devel mailing list