compile: Simplify version-generation logic