-
Notifications
You must be signed in to change notification settings - Fork 508
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
tools/version.sh: fix compilation of shallow clones #220
base: master
Are you sure you want to change the base?
Conversation
#165 is similar / does the same. |
version.sh assumed that commit 16cd907 existed, this isn't true when the source tree is a shallow clone. Tested on OpenBSD 7.6 with a few uncommitted patches to fix unrelated compilation issues.
e716fd5
to
2cf5323
Compare
As I understand, this exists to keep the revision numbers consistent? Seeing as the total rev-count on git up to SVN r6962 (i.e. 16cd907) is only 5849. That said, this could also be accomplished without breaking shallow clones (though producing incorrect revision numbers; your solution is certainly better in that regard) using |
Lines 81 to 86 in 921249c
I just went with what the code already seemed to want to do, although the |
Yeah, this behavior is quite reasonable; i just meant that if one were to blindly evaluate
you would end up with an incorrect version number (likely 1114) for a shallow clone, rather than 0. |
Either way, the logic to keep counting SVN revision numbers seems reasonable to me, if only for familiarity -- since for a long while (while upstream was stale), Aegisub builds were most commonly referred to by their revision numbers. Changing the logic for this would mean a change in how those revision numbers are calculated, making new revision numbers no longer sequential with the old ones (though, by my understanding, there is no real need for them) |
The SVN revision number is not a thing we should bend over backwards to maintain. Especially if we consider the repo setup to be usable now with more frequent releases and CI builds, I would rather go the In short, the logic I propose to build a version number/string is:
Edit: forgot to comment on the actual PR. For now, this is probably a reasonable workaround and better than #165. |
Preparing the Debian package I noticed that the build fails when using the tarball:
Maybe |
See the commit message for details.
Also, maybe we don't need to keep track of this SVN revision number stuff now that Aegisub is on git? That would remove a bit of code.