Run script only in Release mode
Unsolved
Qt Creator and other tools
-
Hi,
I have Qt Creator run a script every time I do a build (for versioning). I'd like that script to only run for release builds. Is there a way I can do that?
I currently have:
versionTarget.target = src/include/version.h versionTarget.depends = FORCE versionTarget.commands = cd ..; pwd ; echo update version ... ; ./rev.sh ; touch src/include/version.h PRE_TARGETDEPS += src/include/version.h QMAKE_EXTRA_TARGETS += versionTarget
in my .pro file.
Thanks,
Gerald -
hey, @GeraldBrandt
this should work
CONFIG(release, debug|release){ versionTarget.target = src/include/version.h versionTarget.depends = FORCE versionTarget.commands = cd ..; pwd ; echo update version ... ; ./rev.sh ; touch src/include/version.h PRE_TARGETDEPS += src/include/version.h QMAKE_EXTRA_TARGETS += versionTarget }
-
@GeraldBrandt
take a look at the documentation section scopes and conditionsI believe for Linux the identifier is unix