About .gitversion File

Hi everyone,

I am trying to use git assisted versioning but keep getting the error “Did not find any .gitversion file” when i run the “tap sdk gitversion” command.

Is this file generated automatically? If it is I can’t generate it so I manually copy and pasted the .gitversion file from the OpenTAP repo but i dont know where to put that file and still get the same error.

Also, when I add an annotated tag, it does not increment the version.

Hi @btyilmaz,

A .gitversion file is not automatically generated.

The idea is, you bump the .gitversion file when you are going to work on a new version, to get new alpha and beta versions.

When you then want to make a release you can use the git tag.

You can read all about it in the Developer Guide.

1 Like

Make sure you check-in your .gitversion file into your branch, or it won’t work when “experimenting with it”.

1 Like

Thanks @rolf_madsen and @alan_copeland , I missed the part where it says " To determine the first three values of the version number, Git assisted versioning reads a .gitversion file in from the root of the repository".

Also, as the @alan_copeland said, I checked-in the file and it worked.

Another thing came to my mind is that the GitVersion can be used for package versions. It may be a cool way to increment version.