Repository navigation
feat: Improve Gitlab support - #1389
Merged
Merged
Conversation
Merged
philclifford
approved these changes
Apr 12, 2025
philclifford
pushed a commit
to philclifford/deb-get
that referenced
this pull request
Apr 14, 2025
* add support for any Gitlab server * only save the .deb URLs * update glab to use simplified CACHE_FILE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR makes the following changes:
Adds support for self-hosted Gitlab instances.
You can continue to use this format if the project is on gitlab.com:
get_gitlab_releases "<user-organization>/<repository>"If the project is hosted elsewhere, you include the full URL instead. For example:
get_gitlab_releases "https://gitlab.example.com/<user-organization>/<repository>"(See also add package: winegui #1390 for an actual example.)
Gitlab expects slashes in the project name to be URL encoded, but deb-get will now convert them automatically.
So
"<user-organization>/<repository>"and"<user-organization>%2F<repository>"are both valid.Extracts only the lines that contain deb files from the Releases JSON, like we do for Github.
But I went a step further and removed all of the remaining JSON from those lines. Resulting in the CACHE_FILE containing only the URLs to the deb files. This will reduce the need to use
cutin the package definition files.Since it's currently the only app using the
get_gitlab_releasesfunction, I went ahead and updatedglabto use this simplified CACHE_FILE. I also noticed that they must've changed their naming scheme fromX86_64.debtoamd64.debat some point, so I grep for both, just in case.