ebrahimebrahim / knock-the-rock

A 2D physics game about throwing rocks.
MIT License
3 stars 0 forks source link

make version string show commit hash #44

Closed ebrahimebrahim closed 4 years ago

ebrahimebrahim commented 4 years ago

The version string for development versions should really show the commit id

We can make a git hook that puts it in before committing

Probably would be easier to have the version string be in its own file, and Globals.gd reads from it

ebrahimebrahim commented 4 years ago

Now I have a different idea of how to do this. Instead of git hooks, we write a script that uses command line to build:

https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_projects.html

The current commit hash can be obtained with git rev-parse HEAD

The build script can

Globals.gd will define a "version_info" dict which contains:

The version string will be made as follows: