You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I want to use Chezmoi to install various binaries from a self-hosted GitHub Enterprise installation. I am already using chezmoiexternals and the githubLatestRelease function to install binaries from github.com, for example:
But this doesn't work for self-hosted GitHub Enterprise as I don't believe there is a way to pass in a custom hostname. Similarly there isn't a way to pass in an auth token (there is $CHEZMOI_GITHUB_ACCESS_TOKEN but I would need a way to provide a token that is scoped to a single domain).
Describe the solution you'd like
Either a new family of functions (e.g. githubEnterpriseLatestRelease) or extending the existing GitHub functions to accept a hostname (e.g. githubLatestRelease "https://git.example.com/owner/repo"). Additionally, a way to provide the auth token for git.example.com in chezmoi.yaml.
Describe alternatives you've considered
Previously I was just using a script to do this:
#!/bin/bashset -o errexit
set -o nounset
set -o pipefail
{{ $version := output "gh""release""--repo=git.example.com/owner/repo""view""--json=name""--template={{.name}}" -}}
gh release --repo git.example.com/owner/repo download --output=- --pattern=example_{{ .chezmoi.os }}_{{ .chezmoi.arch }}.tar.gz {{ $version }} | tar --extract --file=- --gunzip --directory ~/.local/bin example
I have since changed to using a template since I want Chezmoi to purge unmanaged files from ~/.local/bin.
This works okay, but seems a bit hacky and is definitely less readable.
I realize I could also do this using the git-repo external, but I would then need to add some sort is post-install script to do the actual compilation.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I want to use Chezmoi to install various binaries from a self-hosted GitHub Enterprise installation. I am already using
chezmoiexternals
and thegithubLatestRelease
function to install binaries from github.com, for example:But this doesn't work for self-hosted GitHub Enterprise as I don't believe there is a way to pass in a custom hostname. Similarly there isn't a way to pass in an auth token (there is
$CHEZMOI_GITHUB_ACCESS_TOKEN
but I would need a way to provide a token that is scoped to a single domain).Describe the solution you'd like
Either a new family of functions (e.g.
githubEnterpriseLatestRelease
) or extending the existing GitHub functions to accept a hostname (e.g.githubLatestRelease "https://git.example.com/owner/repo"
). Additionally, a way to provide the auth token forgit.example.com
inchezmoi.yaml
.Describe alternatives you've considered
Previously I was just using a script to do this:
I have since changed to using a template since I want Chezmoi to purge unmanaged files from
~/.local/bin
.This works okay, but seems a bit hacky and is definitely less readable.
I realize I could also do this using the
git-repo
external, but I would then need to add some sort is post-install script to do the actual compilation.The text was updated successfully, but these errors were encountered: