Closed rosslebeau closed 7 years ago
It would seem that Heroku has git 1.7.0. Did you recently switch version of Swift you are using? I'm wondering if this requirement is new.
$ heroku run git --version
Running git --version on redacted... up, run.5308
git version 1.7.0
I think what we will have to do, is manually install git in the build pack to get a later version.
I did not change the Swift version. I swear the only thing I changed was some html 😀 I'm using DEVELOPMENT-SNAPSHOT-2016-05-03-a
.
Also super weird, I see this:
$ heroku run git --version
Running git --version on bytefish... up, run.2046
git version 1.9.1
It's old AND inconsistent...
@rosslebeau I think you may be on a higher version of Heroku's stack. You can check via:
$ heroku apps:info | grep Stack
Stack: cedar
Heroku did have some "mysterious" emergency platform maintenance earlier today. I wonder if they had to downgrade git for some reason. https://status.heroku.com/incidents/893
Crap this is in their docs: https://devcenter.heroku.com/articles/cedar-ubuntu-packages
I'm running cedar-14 (the only non-deprecated option), which specifies git 1.9.1.
I wonder why this worked before...
Looking trough the code for Swift Package Manager, the error for git 2.0 is only thrown if there was a problem cloning your repository (https://github.com/apple/swift-package-manager/blob/405c29686f4a5d8213c883df0e157d53d7dbb084/Sources/Get/Git.swift#L37).
You can see the actual git error before the version error:
remote: /usr/bin/git clone --recursive --depth 10 https://github.com/PlanTeam/BSON.git /tmp/build_0826ab0073ff8007fc2b2472e23a5430/Packages/BSON
remote: Cloning into '/tmp/build_0826ab0073ff8007fc2b2472e23a5430/Packages/BSON'...
remote: No submodule mapping found in .gitmodules for path 'docs'
It seems git is actually throwing this error because there is an empty .gitmodules
file in the repository. Newer versions of git will not throw this error when there is an empty .gitmodules
file and the --recursive
clone option is used.
I pushed this morning and everything worked fine. I just tried to push again after changing only some html, and got this error:
I tried cleaning the heroku cache, and I couldnt find any way to view or update the version of git on heroku. I know its not local because my version of git is
git version 2.7.3
Any ideas?