-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
More Robust AVC Version Handling #1299
Conversation
You are the best. |
Would it be possible to indicate that we'd like for the AVC version to overwrite the GitHub version? I don't think the version tags I've been using in my project on GitHub aren't quite CKAN friendly (ex: "v0.1.1-alpha", rather than "0.1.1"), and it'd be nice if I could correct this via the AVC file I'm creating rather than recreating all the release tags. |
@JonDahm For what it's worth we see quite a bit of |
Just to be clear, you're saying that versions formatted with a v in front of the number work just as well as those without? If so, that's great and I don't have to worry about the version numbers comparing correctly. |
It's not automatic, we have to add a flag and that flag automatically adds v to every version (so they're uniform). Because it's manual it means someone has to 'catch' that the v is inconsistent. If you have mods that you know use v intermittently just let us know and we can correct it. |
Ah, okay. But so long as I use the v consistently, there shouldn't be a problem, correct? |
Correct. |
And if you really want to strip the |
Got it. Thanks a bunch! |
kspMaxes.Add(avcKspMax); | ||
|
||
var kspMin = kspMins.Any() ? kspMins.Min() : null; | ||
var kspMax = kspMaxes.Any() ? kspMaxes.Max() : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really clever, thank you! :)
@dbent : I'm so sorry this has been hanging so long, I'm still playing catch-up after being overseas, but this looks fantastic. Merging with great thanks! |
This PR makes the handling of version information found in internal
.version
files more robust. In practical experience the internal.version
files aren't remarkably accurate, so we make the two following changes:version
field, such as from KerbalStuff or a GitHub tag, we do not override it with the value found in the.version
file..version
file. A common example would be if some mod on KerbalStuff indicates that it's compatible with a version of KSP later than what it specifies in its.version
file. In that case we calculate a minimum version from the.version
file and a maximum version from the KerbalStuff metadata.The
CorrectlyCalculatesKspVersionInfo
test contains a lot of cases. Please add any additional cases you think requires testing.