#Injecting version upon export/run

1 messages · Page 1 of 1 (latest)

spare kestrel
#

How would I go about injecting some string into the game when it is run or exported?
I would like to display the output of git describe --dirty in the game so I can better identify if a tester has the right version.

#

Is there a way I could sneak some environment variable in?

spark bough
#

In Export, there's Resources, with the option to filter to export non-resource files/folders.
Could you add some file from git, and the use FileAccess to read it?

spare kestrel
#

Just figured that Godot has a CLI.. Trying something out with that 😄

spare kestrel
#

Well your solution seems like a good one.
Right now I'm having a little problem with godot-mono not printing out anything even when using --verbose or waiting for the export to complete at all..
When I run the command in the screenshot, it just opens up multiple exports at once, gets confused and puts the files weirdly together. Not to mention this is unusable in some sort of pipeline (pipeline would get killed before the export barely starts).

#

Also having a problem running godot-mono inside a Taskfile (https://taskfile.dev/), most probably has to do something with .NET not being correctly available (some env variable issues probably, taskfile has a quite a few of them..).. Not relevant and a completely different issue.

#

When I use my godot.exe for the export, it waits just fine. So I guess just an issue with the uploaded version on scoop.