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

Option to override SpaceDock version with AVC version #2406

Merged
merged 1 commit into from
Apr 11, 2018

Conversation

HebaruSan
Copy link
Member

Problem

A mod that exists only as a bundled folder in another mod on SpaceDock can't have its own version number in CKAN; it must use the bundling mod's version (see #2405). This misrepresents to the user what's being installed, and makes for an awkward transition if we have to switch the source mod, often requiring an epoch bump.

Cause

A decision was made to never trust version files if we have another source of version info:

if (avc.version != null)
{
// In practice, the version specified in .version files tends to be unreliable, with authors
// forgetting to update it when new versions are released. Therefore if we have a version
// specified from another source such as SpaceDock, curse or a GitHub tag, don't overwrite it.
json.SafeAdd("version", avc.version.ToString());
}

Changes

Now there is a way to override the above behavior. If "x_netkan_trust_version_file" is set to true in a given netkan file, then the "version" property will be sourced preferentially from the version file, if any.

Fixes #2405; my test version generated DynamicBatteryStorage-2-1.3.0.0.ckan from the current netkan with that property added, which is the correct version from that bundled mod's version file.

@HebaruSan HebaruSan added Pull request Netkan Issues affecting the netkan data labels Apr 10, 2018
@politas politas merged commit 8461351 into KSP-CKAN:master Apr 11, 2018
@HebaruSan HebaruSan deleted the fix/trust-version-file branch April 11, 2018 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Netkan Issues affecting the netkan data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants