Skip to content
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

[version.sh] small improovement #165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Totto16
Copy link

@Totto16 Totto16 commented Jul 23, 2022

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.

@FichteFoll
Copy link
Contributor

FichteFoll commented Jul 25, 2022

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

Edit: nvm, they would probably be broken anyway.

@Totto16
Copy link
Author

Totto16 commented Jul 25, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants