Use semver to show versions.

This commit introduces the common function to do that.