Allow use of BUILD env variable for version BUILD#958
Allow use of BUILD env variable for version BUILD#958keneanung merged 7 commits intoMudlet:developmentfrom
Conversation
This allows us to set the BUILD part of the version string to anything we like WITHOUT modifying the actual "Makefiles".
src/src.pro
Outdated
| # if you are distributing modified code, it would be useful if you | ||
| # put something distinguishing into the BUILD environment variable to make | ||
| # identification of the used version simple | ||
| # the qmake BUILD variable is NO built-in |
vadi2
left a comment
There was a problem hiding this comment.
Could you make it so if BUILD is defined, it uses that, otherwise it uses the BUILD value in the makefile? Sometimes you don't want to set it as an environment variable every single time and just edit the makefile once. I think I've seen this in other projects as well.
|
That's the case already: If the |
|
Will do in a follow-up PR. |
|
OK, I think I am still getting my head around this - but is it clear that it works correctly for the "release" builds where the BUILD variable should (end up) being empty? |
CMakeLists.txt
Outdated
| SET(APP_VERSION 3.0.1) | ||
| SET(APP_BUILD "-dev") | ||
| IF(DEFINED ENV{BUILD} AND NOT $ENV{BUILD} STREQUAL "") | ||
| SET(APP_BUILD $ENV{BUILD}) |
There was a problem hiding this comment.
Probably should be something like MUDLET_BUILD_VERSION or MUDLET_VERSION_BUILD the word BUILD is too common for an env variable.
|
@SlySven Releases have to be made available in source form and part of that requirement means that you have to actually change these to not have |
|
Resolved the merge conflicts. |
The name `BUILD` is too common to use as a build environment variable. `MUDLET_VERSION_BUILD` uses a namespace (MUDLET) and is far more specific.
|
@ahmedcharles have another look? |
|
@ ahmedcharles wrote:
I think I have got it - I just was initially unsure that when it comes around for Vadim(?) to produce 3.1.0 {in a few days 😉} what needs to be changed so the end result is identified as the "Official" 3.1.0 version is clear - and to me it looked a little less clear that it was - but if the relevant persons can work it out then that is fine. 😁 |
|
Sorry I forgot to mention, could you also update the comments for the Makefiles to say that they can be supplied as environment variables? Not everyone will be able to read qmake/cmake. |
|
The comments say
and
|
|
They do. Time for a power nap. |
This allows us to set the BUILD part of the version string to anything we like
WITHOUT modifying the actual "Makefiles".