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.

  • I came across that question. The answers there says to call "./configure". I think the answer assumes that uncompressing the tar.gz file gives a file named "configure" In my case there is only one file called "gitversion". so calling ./configure gives me this message.

    -bash: ./configure: No such file or directory

    – Sunil Shahi Jul 21 '20 at 17:09
  • Did you read the install instructions that are linked to in the README? – user535733 Jul 21 '20 at 18:19
  • @user535733 Not sure what you are pointing to. I do not see any instruction in README. Could you share a link perhaps? – Sunil Shahi Jul 21 '20 at 18:33
  • 1
    Looks like the documentation you are referring just says install mono-complete. and run mono gitversion.exe The problem is I do not get exe file when I uncompress the tar.gz file. So I am still lost.

    I have opened an issue in github. Hopefully I will get some guidance from there. Thanks

    – Sunil Shahi Jul 21 '20 at 20:05
  • Hmmm, you're right: If the file you need isn't in the tarball, not much Ubuntu can do about that. – user535733 Jul 21 '20 at 20:18

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