Carolyn Van Slyck

GitVersion for Bamboo

I have just released a plugin for Atlassian Bamboo which integrates with GitVersion: GitVersion for Bamboo. Check out the link for info on how to install and configure the plugin.

GitVersion is a tool which automates generating unique, semantic versions. It detects your branching pattern and uses your tags to generate a repeatable version number which you can then use to stamp assemblies, version NuGet packages, etc.

What I like about GitVersion is the flexibility it provides. Instead of generating a single version number, “take it or leave it”, GitVersion provides over a dozen variables that you can choose from to build your own version number. If you are lucky and can just use pure semver, great!, use the FullSemVer variable and call it a day. However if you are perhaps like me, working on a legacy code base with an existing versioning scheme, it’s still incredibly useful.

Here is the output of running gitversion.exe from my repository:


At work we are (still!) transioning from svn to git. Previously we would use the svn revision as the 4th part of our version number, e.g. 1.0.0.{svn rev}. With git that’s not available as we just have a commit hash which doens’t fit the bill. So we are using GitVersion to generate just the last number for us by using the BuildMetadata variable. BuildMetadata represents the number of commits on a branch since the last release tag. So if when we started working on v15.2.0, the first commit is tagged and each new commit will result in a unique, increasing version number: first commit =, second commit = …

Is that a good idea? Shouldn’t we have simply jumped onto the semver bandwagon? Probably. However sometimes things are beyond a peon’s control and it’s nice that I don’t have to boil the ocean just to get a number.