Search code examples
gitsvnversionenterprisesnapshot

Annoying software versioning, or is it just me?


One of our developer keep releasing its software to "Release" repository of Nexus in a weird versioning format, such as 5.2.3-6-gc0dc298. This is in fact major.minor.build-#ofcommits-lastCommitTag. I understand this may be useful for developers to quickly identify which feature was made to this binary by observing the version number, but is this not standard?

I don't think this is related to Agile or not, Git vs. SVN differences, and not Java vs Haskell. I believe a releasable version format would simply be x.y.z, whereas I would consider the above format as a SNAPSHOT format. Am I right? Are there any merit to use a long version formatting in production environment?


Solution

  • weird versioning format, such as 5.2.3-6-gc0dc298.

    This is a way to reference a commit which hasn't been tagged, based on the nearest tag.

    In other words, "a releasable version format would simply be x.y.z" can be achieved through tags, following any standard you want, like Semantic Versioning.

    But if you don't tag all releases (typically in a multiple intra-day release cycle, where you are pushing and deploying lots of very small fixes), then the git describe is a good alternative.

    It separates:

    • the developement lifecycle (which produces stable versions to be release)
    • the release lifecycle (where you have a lot of production-specific changes/small fixes on the release branch, which will be or won't be back-ported to the development branch)

    See more at "Is there a standard naming convention for git tags?"