Unsure how to use output variables


#1

Hi, I was trying to use the output variables feature and was unsure how to use it.
https://docs.vespene.io/variables.html#output-variables

The documentation says
"In the build output, simply write the following to standard output on a blank line:"
vespene/set variable_name variable_value

However the output section of a build is unwritable to, and if I try writing the suggested on a blank line in the script part the project fails with this message:
0.00m | /tmp/vespene/66/vespene_launch.sh: line 12: vespene/set: No such file or directory

Cheers.


#2

vespene/set isn't a command, but is instead just something you need to output during the build script with an echo.

https://docs.vespene.io/variables.html#output-variables

echo 'vespene/set some_variable "here is what values it gets"'

I really should update the docs to include an 'echo' in there to make it more clear, and rename 'some_value' in the docs to something that makes it clear that's a variable name and not a value.

Also, variable names need to be something that's a valid python identifier so like_this, not something that isn't like 2StartsWithNumber or HasPunctuation!


#3

I added a ticket here so I don't forget to do this:


#4

Cheers, using an echo made it work.


#5

Awesome, I'm not sure that was the best way to implement that feature, but it seemed like the best option. Parsing something like JSON inside of non-JSON output is always kind of weird.