I have a .pri file in the QT application, where it gets the git lighweight tag from the system.
This is the .pri file in the Qt application.
Version = $$system(git describe --tags)
I have a docker container created for this application. This container do not have git. I do not want to install git in the container just to get the commit tag.
I want to use the predefined CI/CD environment variable in gitlab-ci.yml. And pass this CI/CD variable to .pri file or set the CI/CD variable as system variable. Is it possible to pass CI/CD variable as an argument to .pri file? Or get the environment variable from system in .pri file?
Is there a predefined CI/CD variable to get lightweight tags (git describe --tags)? I just found CI_COMMIT_TAG and CI_COMMIT_SHORT_SHA from this document. DO I need to combine these two variables to get the lightweight tags? Is there a gitlab API to get lightweight tags?
https://docs.gitlab.com/ee/ci/variables/predefined_variables.html