Aegisub
Aegisub copied to clipboard
[version.sh] small improovement
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.
Would this break CI builds that operate on a shallow clone of 50 commits only?
Edit: nvm, they would probably be broken anyway.
I tested this with normal CI runs and it didn't affect anything, it just fixes the example I described :)