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

Create skip-releases option for NetKAN #2996

Merged
merged 2 commits into from
Feb 10, 2020

Conversation

DasSkelett
Copy link
Member

@DasSkelett DasSkelett commented Feb 10, 2020

Motivation

#2681 gave us the great option to inflate multiple releases with netkan.exe.
But sometimes you don't want to begin with the latest release, for example if the folder structure has changed in the history of the mod, and you have to adjust the netkan file for the older releases. Or if one release is failing inflation and you have to skip it.
I had to deal with both of these cases in KSP-CKAN/CKAN-meta#1786, so I finally decided to implement this feature.

Changes

This PR gives netkan.exe a new commandline option, --skip-releases <int>.
This commandline option is fed into the TransformOptions, which has a new int? SkipReleases property.
It is set with the constructor, the queue handler passes null.

Each kref source transformer now skips the given number of releases, and starting from this index, the number of releases given with opts.Releases are taken.

This feature may be useful for KSP-CKAN/NetKAN-Infra#5, too.

@DasSkelett DasSkelett added Enhancement New features or functionality Netkan Issues affecting the netkan data labels Feb 10, 2020
Copy link
Member

@HebaruSan HebaruSan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Curse and Jenkins have some bugs at the moment, see comments for specifics.

With the --skip-releases <int> option set, NetKAN skips the given number of releases for inflation.
This happens in the transformers for all the kref sources, just before the --releases option is applied to take multiple releases.

This feature is useful for backfilling old releases of a mod, where you don't want to re-inflate the newer ones just to get to the older ones.
HebaruSan added a commit that referenced this pull request Feb 10, 2020
@HebaruSan HebaruSan merged commit 053c487 into KSP-CKAN:master Feb 10, 2020
@DasSkelett DasSkelett deleted the feature/netkan-skip-releases branch February 10, 2020 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New features or functionality Netkan Issues affecting the netkan data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants