Skip to content

Conversation

@danielmarbach
Copy link
Contributor

This pull is a discussion. I quickly spicked a build server implementation which sets environment variables in the executing process. The idea was that a build script which calls msbuild and compiles a solution which contains projects with the gitflowversiontask the environment variables could be read by the script. Unfortunately I couldn't read the environment variable in my scripts.

Any ideas how this could be improved? Is this useful or not? Is there a better and working approach to feed information back into the build script without calling GitFlowVersion.exe manually?

@JakeGinnivan
Copy link
Contributor

Unfortunately environmental variables cannot be set in a parent process from a child process.

GitHubFlowVersion gets around this by being the execution host. The command line tool has /ProjectFile for msbuild or /Exe which instructs GitHubFlowVersion to run those things.
Because it is the host, all those environmental variables are available.

I also have a teamcity meta runner which you can install on the build server to make that super easy.

Another option is output parameters for the msbuild task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants