Pelagicore / vagrant-cookbook

A repository of vagrant configuration snippets
Mozilla Public License 2.0
13 stars 33 forks source link

qmake-git-builder: Use params from env #37

Closed jonte closed 7 years ago

jonte commented 7 years ago

Use environment variables as in parameters to the script in order to allow optional parameters. This also improves code by being more self-documenting in Vagrantfiles (since the environment variable name gives you a hint of what the parameter is for).

This also adds support for not wiping the source directory of the qmake project bein built.

WARNING: The default behavior of this script HAS CHANGED where the source directory is now NOT removed per default. In order to remove the source directory, please set the WIPE_SRC_DIR parameter to "yes".

Signed-off-by: Jonatan Pålsson jonatan.palsson@pelagicore.com

jonte commented 7 years ago

This is a WIP, I'm planning to fix the rest of the builders as well. Please review my approach & I will continue w/ the rest.

In other words, please wait w/ merging until I fix the rest.

jonte commented 7 years ago

@frznlogic The +x is to evaluate the entire expression to "x" if the variable checked is non-empty. This is useful since I don't want to handle special cases where the variable contains weird chars, such as ". It's basically a safety precaution, since I don't care about the value itself.. Just the existence of a value (the values themselves are used later on in the script).

jonte commented 7 years ago

Pushed an update whereQMAKE_ARGS and QMAKE_PATH are now optional.

jonte commented 7 years ago

Added GIT_REVISION to qmake & cmake builder docstrings

jonte commented 7 years ago

I'm pretty happy with this now. Waiting for review.