-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Non-Functional on Vercel; Incorrect Dates, Fatal Errors, Etc. #7
Comments
Finally had some time to do some digging on this and setup a test repo connected to Vercel to do some debugging. If I'm being completely honest, I'm a little frustrated by the Vercel docs; there is lots of info on Github integrations, but not very much information published on how they use Git internally as part of their build/deploy process. fatal: not a git repositoryI think this was fixed by #5 - I did not get this error with my test repo - however, technically I actually kind of should have. Pretty much the only piece of related documentation I could find related to how Vercel uses Git for deploy builds was this discussion post: "Access git logs in build process". Things must have changed since then, since Using git in Vercel's Build ProcessA basic test showed that What I Could DiscoverIn playing around with a test repo and trying out a bunch of git commands, I was able to find the interesting findings:
All the above findings point to Vercel basically using a shallow copy of the git repository on every deploy. Realistically, they are probably using something like
WorkaroundMy suggested workaround for this situation is actually the same suggestion I give in general for using this tool with build systems that might or might not have full git history; run the tool locally, save the output (e.g.
This is also the current approach I'm using for a large Gatsby project that turns a bunch of documentation Markdown files into a static site. I have a writeup on it here, the system is live here (see the timestamps at the bottom of every page on the site), and there is also a related docs section for this tool here.
|
@johnleider Tagging you for the above, in case you are interested in what I discovered after looking into your issues using this tool with Vercel. The TLDR of the above is that Vercel appears to use a shallow copy (last commit / tip) of a given git repo, which essentially makes it look like all files were created / modified in that commit. There is no (easy) workaround I know of to get the full git history exposed on Vercel, so my suggested workaround for situations like this is to simply generate the timestamps locally, as part of a commit hook, and commit the timestamps file to source control. |
Related: See #5
Error from process (before my own error gets thrown):
Then my error is thrown (here).
Likely culprits:
The text was updated successfully, but these errors were encountered: