[Qt-creator] How to put custom build steps into Git?
orgads at gmail.com
Fri Jul 6 17:50:48 CEST 2018
On Fri, Jul 6, 2018 at 6:47 PM Murphy, Sean <smurphy at walbro.com> wrote:
> Thanks guys! Actually I think a combination of both your suggestions might
> work better than what I have currently. What I don’t like about my current
> setup is that the thing that generates the .h file is an executable – it
> has to be compiled to work. The only real advantage of that is that it is
> written in Qt, so it’s cross platform in that sense, but the disadvantage
> is that it doesn’t exist on a developer’s machine until it itself is
> compiled. So moving to a script is probably safer. The work it is doing is
> basically exactly the same as what you have described below.
> So my current thought it to use Orgad’s commands in the .pro file, but
> have two scripts checked in to the project: a bash .sh file for
> Linux/Mac, and an equivalent .bat file for Windows, and properly platform
> scope the
> git_ver.commands = your-app-that-generates-the-version-header
> command in the .pro file. That way I can avoid introducing a Cygwin
> dependency for the Windows users and still get that Git revision
> information compiled in automatically.
If you can deploy to some directory in the PATH, you can create a shell
script named git-apply-version, place it in a directory in the PATH and
execute it as "git apply-version". This should work on all platforms
without extra dependencies.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qt-creator