3

I am trying to install gitversion in our build server in Ubuntu 18.04.4 LTS (GNU/Linux 5.3.0-1030-aws x86_64). The documentation has very little instruction. I found tar.gz file in github (here) upon uncompressing using following command I only got a single file named "gitversion".

wget https://github.com/GitTools/GitVersion/releases/download/5.3.7/gitversion-ubuntu.18.04-x64-5.3.7.tar.gz
tar -xvf gitversion-ubuntu.18.04-x64-5.3.7.tar.gz

I am completely lost after that. Judging by the lack of instruction in documentation, I am guessing this should be simple or obvious. May be the problem is I am newbie.

I also looked here. but this instruction is using a zip file that is not available for latest release.

Thanks in advance.

2 Answers2

4

Yea. The GitVersion doc on installation is somewhat blur for linux distros. Well, answering your question above i think I figured it out. Move the gitversion binary generated after the tar -xvf gitversion-ubuntu.18.04-x64-5.3.7.tar.gz to /usr/local/bin. See complete installation steps below:

wget https://github.com/GitTools/GitVersion/releases/download/5.3.7/gitversion-ubuntu.18.04-x64-5.3.7.tar.gz
tar -xvf gitversion-ubuntu.18.04-x64-5.3.7.tar.gz
sudo mv gitversion /usr/local/bin

Also the gitversion tool works only on git initialized directory. Happy semantic versioning!!!

1

I know that this is an old question, but if you came to the question more recently the correct answer is now in the official docs

Offical Docs

And here is my version of using it:

echo Download the installer script
export DOTNET_INSTALL_SCRIPT=/tmp/dotnet-install.sh
wget https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh -O $DOTNET_INSTALL_SCRIPT
chmod --verbose u+x $DOTNET_INSTALL_SCRIPT

echo Run the installer script for the GA release of .net 7.0 $DOTNET_INSTALL_SCRIPT --quality GA --channel 7.0

echo set up the paths export DOTNET_ROOT=$HOME/.dotnet export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools

echo install and run gitversion dotnet tool install --global GitVersion.Tool dotnet-gitversion /updateprojectfiles

running the script

Preet Sangha
  • 126
  • 3