Open asbjornu opened 10 months ago
Adding fetch-depth: 0
to actions/checkout
seems to have fixed the problem. As that slows down the build, it would be nice to know why unity-builder
is performing git fetch --unshallow
and if anything can be done to disable that behavior.
It's doing this to help it generate the version number in semantic mode. If you don't want to have it run the clone with depth 0 you should be able to set the versioning to custom and pass in your own version number and it should skip the shallow check.
I see. Perhaps it should be mentioned in the documentation that versioning: Semantic
leads to a git fetch --unshallow
? Some logging from within Versioning.isShallow()
would also be useful.
It might perhaps be that git rev-parse --is-shallow-repository
for some reason doesn't always produce the expected false\n
output?
Oh, reading the code, I see that first a git fetch --unshallow
is invoked. If it fails, it only leads to a warning. However, a regular git fetch
is performed right after, and if that fails, it leads to an error.
For some reason, the result from both fetch
operations is The process '/usr/bin/git' failed with exit code 128
, which isn't very helpful. It seems like the underlying error message is swallowed by the git()
method passing shouldLog = false
to System.run()
:
Whether logging should be performed here could possibly be a configurable option on the action, no?
Bug description
As mentioned in https://github.com/game-ci/unity-builder/issues/564#issuecomment-1892023344, I'm experiencing the following problem when trying to build my Unity project with
game-ci/unity-builder@v4
:How to reproduce
I'm not sure how to reproduce this, but this is a WebGL build if that matters.
Expected behavior
game-ci/unity-builder
shouldn't fail to rungit fetch
. I wonder why it is runninggit fetch
at all. Can anyone please provide details as to why it is and possibly how to avoid it?Additional information
The GitHub action configuration looks like the following: