Id says that using your build system (i.e. gulp) for this job is exactly what you need for this, not hacks at all.
Instead of including only the hash in your version string, you can include the output of git describe , which also contains the name of the last tag and how many changes have passed since then.
However, if your Gulpfile displays release assets that are version-controlled, you will have a small problem: if you create a commit with the released version (and possibly tag it), the hash that you built into the application before you point to commit with assets that you actually created for this version, but before the version in front of it. This is why most people use tags and version numbers, rather than hashes, to cross-reference a version of a binary application with the state of the original repository during build.
source share