240p-test-mini icon indicating copy to clipboard operation
240p-test-mini copied to clipboard

Zipfile build displays a blank version number

Open pinobatch opened this issue 1 year ago • 0 comments

In 240p Test Suite v0.23, I added a feature to automatically display a build identifier generated using git describe --tags. Most of the work was done around commit c056e59, in turn based on the work I did for the same feature in Holy Mapperel.

git describe --tags | tr -d '\r\n' > obj/nes/last-commit-now`

When Git cannot find an appropriate tag, this produces a blank file. This can happen when building 240p Test Suite in three situations: from a zipfile, from a shallow clone, or (a decade or two from now) once the maintainer has migrated to a VCS other than Git. This leads to a blank version number on the Credits screen. Currently we avoid a blank version number in GitHub Actions builds by avoiding a shallow clone (#45).

A user of the gbadev Discord server has characterized reliance on git describe --tags to display a version number as "a bug in your build process. My NDS SDK can detect if it isn't building in a git repo, and it doesn't try to use git describe." How can we provide a useful version number for a copy of 240p Test Suite built from a zipfile without adding yet another manual step to release_checklist.md and renumbering all steps that come after it?

pinobatch avatar Mar 21 '23 15:03 pinobatch