Yeah that works fine. Also just adding any old tag works too it seems.
Thanks!

/Tomas

On 5 June 2017 at 23:59, Burt Silverman <bur...@gmail.com> wrote:

> Here is a quick and dirty temporary fix that can get you through "make
> build-release" when tags are missing from your shallow repository. I added
> the 2>/dev/null parts so you won't be alarmed by fatal error messages.
> --Burt
>
> diff --git a/src/scripts/version b/src/scripts/version
> index d8728a9..d317f14 100755
> --- a/src/scripts/version
> +++ b/src/scripts/version
> @@ -7,10 +7,7 @@ cd "$path"
>  if [ -f .version ]; then
>      vstring=$(cat .version)
>  else
> -    vstring=$(git describe)
> -    if [ $? != 0 ]; then
> -      exit 1
> -    fi
> +    vstring=$(git describe 2>/dev/null)
>  fi
>
>  TAG=$(echo ${vstring} | cut -d- -f1 | sed -e 's/^v//')
> @@ -18,7 +15,7 @@ ADD=$(echo ${vstring} | cut -s -d- -f2)
>
>  git rev-parse 2> /dev/null
>  if [ $? == 0 ]; then
> -    CMT=$(git describe --dirty --match 'v*'| cut -s -d- -f3,4)
> +    CMT=$(git describe --dirty --match 'v*' 2>/dev/null | cut -s -d-
> -f3,4)
>  else
>      CMT=$(echo ${vstring} | cut -s -d- -f3,4)
>  fi
> (END)
>
>
> On Mon, Jun 5, 2017 at 4:23 AM, Tomas Brännström <
> tomas.a.brannst...@tieto.com> wrote:
>
>> OK, so when doing a shallow clone I guess it skips some needed files
>> somehow? But when doing a complete fork, I should get the whole history..
>> Are there submodules or something similar that might not get downloaded
>> correctly when doing this?
>>
>> /Tomas
>>
>> On 2 June 2017 at 20:23, Ed Kern (ejk) <e...@cisco.com> wrote:
>>
>>> Tomas,
>>>
>>> Just another data point for you/whomever its not specific to forking..
>>> If you do a shallow clone  —depth=1 you will get the same error on build…
>>>
>>> Ed
>>>
>>>
>>>
>>>
>>> On Jun 2, 2017, at 12:49 AM, Tomas Brännström <
>>> tomas.a.brannst...@tieto.com> wrote:
>>>
>>> No it's the same :-(
>>>
>>> One thing though: when I get these errors I clone from a fork of the vpp
>>> repo that we made. Is there some kind of git-hook that creates these
>>> version files/update the .deb files with a version when cloning from the
>>> main vpp gerrit repository, that might not fire when cloning from a fork?
>>>
>>> /Tomas
>>>
>>> On 1 June 2017 at 19:02, Florin Coras <fcoras.li...@gmail.com> wrote:
>>>
>>>> Hi Tomas,
>>>>
>>>> That sure is weird.
>>>>
>>>> (backup everything that’s not in git)
>>>> git clean -fdx
>>>> make bootstrap
>>>> make build
>>>>
>>>> Do you still see the issue?
>>>>
>>>> HTH,
>>>> Florin
>>>>
>>>> On Jun 1, 2017, at 6:18 AM, Tomas Brännström <
>>>> tomas.a.brannst...@tieto.com> wrote:
>>>>
>>>> Hi
>>>> I'm getting build errors when trying to build a recent commit on the
>>>> master branch:
>>>>
>>>> /home/ubuntu/git/vpp/build-data/../src/vnet/tcp/builtin_client.c:25:29:
>>>> fatal error: vpp/app/version.h: No such file or directory
>>>>  #include <vpp/app/version.h>
>>>>                              ^
>>>> compilation terminated.
>>>>
>>>> I'm building using the "extras/vagrant/build.sh" script (or
>>>> "build-root/vagrant/build.sh" in slightly earlier versions). What's strange
>>>> here is that I built it successfully on the exact same commit yesterday on
>>>> another machine. The commit in question is 
>>>> 79ea7ec3b3c04d334a21107818c64d70c42b99ae
>>>> but I tried on the latest master as well.
>>>>
>>>> Also, I tried to build an earlier version (git tag v17.07-rc0) and got
>>>> another error, where the .deb files could not be built  because the
>>>> "version" was missing. I don't have the exact printout though.
>>>>
>>>> Am I missing something here? I'm trying to build in an ubuntu trusty
>>>> server install, and it has worked before.
>>>>
>>>> /Tomas
>>>>
>>>> _______________________________________________
>>>> vpp-dev mailing list
>>>> vpp-dev@lists.fd.io
>>>> https://lists.fd.io/mailman/listinfo/vpp-dev
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> vpp-dev mailing list
>>> vpp-dev@lists.fd.io
>>> https://lists.fd.io/mailman/listinfo/vpp-dev
>>>
>>>
>>>
>>
>> _______________________________________________
>> vpp-dev mailing list
>> vpp-dev@lists.fd.io
>> https://lists.fd.io/mailman/listinfo/vpp-dev
>>
>
>
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to