GIT-VERSION-GEN: rewrite to manage RAINBOWS_VERSION const

This DRYs up versioning and makes packages easier to distribute.