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

Ability to update repos without a game instance #4161

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Aug 15, 2024

Background

The ckan update command retrieves fresh metadata from repositories, but currently it requires a game instance to work. Since #3904, repositories and game instances have been decoupled somewhat, so this should not be strictly necessary anymore.

Motivation

For https://github.com/KSP-CKAN/CKAN-ModInstaller, it would be nice to be able to pre-load the Docker image with metadata so a mod's build wouldn't have to wait for a ckan update command to run. Ideally we could do this without creating a temporary game instance during the docker build.

Changes

Now the ckan update command has several new flags:

  • -g KSP -u URL [URL2 ...] will update the repos with the given URLs, using the -g parameter to determine the game to use
  • -g KSP / -g KSP2 without -u will update the default repo for the given game (limit one per command)
  • -f will force an update to be performed even if the repo's ETags haven't changed
  • -l is now an alias for --list-changes

This will allow us to add these commands to the ModInstaller's Dockerfile to pre-load it with metadata:

ckan update -g KSP
ckan update -g KSP2

@HebaruSan HebaruSan added Enhancement Cmdline Issues affecting the command line Core (ckan.dll) Issues affecting the core part of CKAN Registry Issues affecting the registry labels Aug 15, 2024
@HebaruSan HebaruSan merged commit 5ad8133 into KSP-CKAN:master Aug 15, 2024
3 checks passed
@HebaruSan HebaruSan deleted the feature/update-repo-urls branch August 15, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmdline Issues affecting the command line Core (ckan.dll) Issues affecting the core part of CKAN Enhancement Registry Issues affecting the registry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant