Aegisub icon indicating copy to clipboard operation
Aegisub copied to clipboard

[version.sh] small improovement

Open Totto16 opened this issue 2 years ago • 2 comments

Create explicit error, when the version number couldn't be fetched.

This solves some issues when running CI's that don't fetch the GitHub repo in normal mode, per example if you build it in flatpak with the git source, it fails to get the revs, but the compilation doesn't break because of that error, then after the whole compilation succeeds, at the end the git_version.h is corrupt, since BUILD_GIT_VERSION_NUMBER is not a valid int, since it's empty. So the Compile error is hardly readable and you could already know earlier that the compilation failed.

Totto16 avatar Jul 23 '22 12:07 Totto16

Would this break CI builds that operate on a shallow clone of 50 commits only?

Edit: nvm, they would probably be broken anyway.

FichteFoll avatar Jul 25 '22 07:07 FichteFoll

I tested this with normal CI runs and it didn't affect anything, it just fixes the example I described :)

Totto16 avatar Jul 25 '22 16:07 Totto16