Hi,
is there any possibility to read the stdout of a commandline application to a variable?
Thanks,
Michael
Hi Micheal,
Currently we don’t have any way to do this within Continua. If you have FinalBuilder, you can create a FinalBuilder project to run the command line, log the output to a variable then set the Continua variable. This can then be run from a FinalBuilder action in Continua.
So there is no way to set the build number from values in the sources without using FB?
I want to set the build no to the application version. And it is stored in the repository.
Hi Micheal,
You can write custom log messages to stdout from a program or batch file. See the following batch file example;
@echo 9.9.9.9>version.txt
@for /f %%x in (version.txt) do set BuildVersion=%%x
@echo @@continua[setVariable name=‘BuildVersion’ value=’%BuildVersion%’ ]
@echo @@continua[setBuildVersion value=’%BuildVersion%’ ]
The GitVersion tool communicates with Continua in this way. See https://github.com/Particular/GitVersion/blob/master/GitVersionCore/BuildServers/ContinuaCi.cs