Update spacedock_adder.py to also generate the Github download in it's NetKANs #325
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Since version 1.34 of CKAN, CKAN has supported multiple download links in its NetKANs. And since then most mods for KSP2 have been using this feature. But it is slightly tedious when wrangling a NetKAN generated from the spacedock adder to have to go and find the repo, and copy the correct structure to add the github download link.
Solution.
When the spacedock_adder recieves a request to add a mod to spacedock it now checks if the
source_link
is a valid github repository that has a release with assets, and generates the github portion of a netkan using this repo, and also tries to deduce what the correctx_netkan_version_edit
is for said github portion. When it does this it will place this portion of the netkan in front of the spacedock portion of the netkan, in line with how most of the KSP2 netkans in this style have already been structured.