Create GitHub release package download module #23

Open
opened 2024-04-07 14:06:57 +00:00 by benie · 1 comment
Owner

A very common pattern for tools which are not available, or not up to date, in package managers is to download the latest release package from GitHub and install that in either /usr/local or ~/.local (which may or may not be managed by stow). This often requires a lot of repetitive json query, executable stat, and string munging which is almost identical across the different roles.

Since this is a common repetetive task, perhaps this should be a custom module. Maybe looking something like this:

- github_release:
    project: neovim/neovim
    state: latest
    dest: /usr/local
    asset_pattern: nvim-linux64.tar.gz
A very common pattern for tools which are not available, or not up to date, in package managers is to download the latest release package from GitHub and install that in either `/usr/local` or `~/.local` (which may or may not be managed by `stow`). This often requires a lot of repetitive json query, executable stat, and string munging which is almost identical across the different roles. Since this is a common repetetive task, perhaps this should be a custom module. Maybe looking something like this: ```yaml - github_release: project: neovim/neovim state: latest dest: /usr/local asset_pattern: nvim-linux64.tar.gz ```
Author
Owner

Alternatively, split each phase apart. Have a module to install a package from an archive (zip/tar.gz/xz/...) and another to handle the GitHub API side of things.

Alternatively, split each phase apart. Have a module to install a package from an archive (zip/tar.gz/xz/...) and another to handle the GitHub API side of things.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: config/local#23
No description provided.