I have the following file, which defined a version number of a project, which I am using in many places, like CMake files, python scripts, and other configurations. My only struggle is how can I read this in my batch file in windows? The syntax seems a little bit weird and I have to struggle with it for a few hours now and still can't figure it out.
Version.txt:
VERSION_MAJOR 09
VERSION_MINOR 02
VERSION_PATCH 21
VERSION_SUFFIX rc
What I am trying to do, is to use the values of the variables above in my bat script, something like this:
BatchScript.bat
VERSION_MAJOR = @VERSION_MARJO_FROM_FILE (e.g 09)
VERSION_MINOR = @VERSION_MARJO_FROM_FILE (e.g 02)