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

Update spacedock_adder.py to also generate the Github download in it's NetKANs #325

Merged
merged 11 commits into from
Feb 3, 2024

Conversation

cheese3660
Copy link
Contributor

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 correct x_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.

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.

Alright, let's see how this goes. Thanks for putting this together!

@HebaruSan HebaruSan merged commit d96e3b9 into master Feb 3, 2024
4 checks passed
@HebaruSan HebaruSan deleted the spacedock_adder_add_github branch February 3, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants