neosphere
neosphere copied to clipboard
Display commit ID to user along with Sphere version
When compiling from source, the version is:
miniSphere X.X.X JS game engine [x64]
I suggest displaying a shortened commit id after it (on both official releases and self-compiled versions), which is useful for troubleshooting.
The convention has actually recently changed along with the rebranding; the new convention is:
neoSphere 5.5.2+ JS game engine [x64]
i.e. the version number of the last official release followed by a plus sign +
, rather than just X.X.X
. (note Oozaru now uses the new convention too). Of course this still doesn't tell you the exact commit, but at least shows which release it's based off of. Having an actual commit ID there would be more difficult, since the displayed version number is managed manually at present. So we'd need to automate that first, as it's impractical to manually edit the commit ID before every single commit.
It occurs to me that the commit IDs can't actually go into the commits themselves, since you would have to:
- Prepare a commit
- Get the commit ID of the change
- Fill in the commit ID in the source
- Commit to the repository
The problem here is that Step 3 would necessarily change the commit ID. So it would need to be filled in at build time, which is tricky since the build process fundamentally differs depending on the OS. Windows builds are done with MSVC, macOS with Xcode, and Linux with make
.
This will need further thought, it seems.