neosphere icon indicating copy to clipboard operation
neosphere copied to clipboard

Display commit ID to user along with Sphere version

Open DaVince opened this issue 4 years ago • 2 comments

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.

DaVince avatar Dec 23 '20 19:12 DaVince

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.

fatcerberus avatar Dec 23 '20 21:12 fatcerberus

It occurs to me that the commit IDs can't actually go into the commits themselves, since you would have to:

  1. Prepare a commit
  2. Get the commit ID of the change
  3. Fill in the commit ID in the source
  4. 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.

fatcerberus avatar Dec 27 '20 15:12 fatcerberus