firebelley / godot-export

Automatically exports your Godot games.
MIT License
460 stars 53 forks source link

feat: Add initial_import option #97

Closed AntonioDell closed 1 year ago

AntonioDell commented 1 year ago

If initial_import is set to true, the godot project will be opened in a headless editor once, before exporting the binaries. This triggers importing all assets and creating the .godot directory. It is necessary for headless exports to work, if no .godot folder exists in the git repository. The .godot folder is excluded from git in the default godot 4 .gitignore.

The import is only executed, if use_godot_4 is true, since godot 3 has dedicated headless builds and does not support the --headless argument.

firebelley commented 1 year ago

Thanks for this! What do you think about making this default behavior when Godot 4 is being used, rather than making it an option? So, always call importProject() before doing the export when use_godot_4 is true? I can see most people needing this and so it seems sensible to me to just build this in as part of the Godot 4 flow.

AntonioDell commented 1 year ago

That's a good point. I don't think it will break anything even for people who commit their .godot directory, so I will change the behaviour for use_godot_4.

AntonioDell commented 1 year ago

initial_import is now the default behavior if use_godot_4 is set. The flag was removed from the action.yml, README.md and code. Thank you @firebelley for the suggestion :)