Skip to content

feat: Improve Gitlab support - #1389

Merged
philclifford merged 3 commits into
wimpysworld:mainfrom
silentJET85:improve-gitlab
Apr 12, 2025
Merged

philclifford merged 3 commits into
wimpysworld:mainfrom
silentJET85:improve-gitlab

Conversation

@silentJET85

@silentJET85 silentJET85 commented Apr 11, 2025 •

Copy link
Copy Markdown
Contributor

This PR makes the following changes:

  1. 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.

  2. 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 cut in the package definition files.

  3. Since it's currently the only app using the get_gitlab_releases function, I went ahead and updated glab to use this simplified CACHE_FILE. I also noticed that they must've changed their naming scheme from X86_64.deb to amd64.deb at some point, so I grep for both, just in case.

@philclifford
philclifford merged commit ac12e4e into wimpysworld:main Apr 12, 2025
@silentJET85
silentJET85 deleted the improve-gitlab branch April 13, 2025 02:06
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
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