Closed jan-molak closed 7 years ago
Answered it myself; My understanding was that Travis sets the branch before the before_install
, but it looks like it doesn't.
fatal: could not set upstream of HEAD to origin/master when it does not point to any branch.
The command "scripts/travis/before_install.sh" failed and exited with 128 during .
Main question is why do you need to have branch in before install step? I see lot of steps in before_install.sh without any explanation why they are needed.
As you say, there are many steps there related to cleaning and re-setting up the git repo. One of the issues has been that the whole history isn't guaranteed to be there – IIRC this helped to mitigate that.
Thanks good to know! Would be nice to have it noted there so others understands reasoning behind ugly rm -rf .git
.
Also this git fetch --unshallow --tags
might solve the issue as described here http://stackoverflow.com/a/39467986
I noticed that in your
before_install.sh
you're deleting the local git repository (cloned by travis) and then clone it yourself again.Could you please advise why this is required?
Thanks, Jan