From 0174951a4687f18eee79259d798d1d2e5436bb4a Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 31 Jul 2025 10:13:02 -0300 Subject: [PATCH] ci: aur sources (#378) * ci: aur sources so users can install from source as well. * Update .goreleaser.yml * chore: go mod tidy Signed-off-by: Carlos Alexandro Becker * fix: updates --------- Signed-off-by: Carlos Alexandro Becker --- .goreleaser.yml | 41 +++++++++++++++++++++++++++++++++++++++++ go.sum | 2 -- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 9577a64e6d4bc9cfda935b7e7166cb744c577639..8c873cb525991471fe80423f75f65a449c4bd947 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,6 +15,7 @@ metadata: description: "A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal." maintainers: - "kujtimiihoxha " + - "caarlos0 " # for aur nightly: publish_release: true @@ -82,6 +83,46 @@ archives: checksum: name_template: "checksums.txt" +aur_sources: + - private_key: "{{ .Env.AUR_KEY }}" + git_url: "ssh://aur@aur.archlinux.org/crush.git" + makedepends: + - go + - git + prepare: |- + go mod download + build: |- + mkdir completions + mkdir manpages + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + go build -ldflags="-w -s -buildid='' -linkmode=external -X main.version=v${pkgver}" . + ./crush completion bash >./completions/crush.bash + ./crush completion zsh >./completions/crush.zsh + ./crush completion fish >./completions/crush.fish + ./crush man | gzip -c >./manpages/crush.1.gz + package: |- + # bin + install -Dm755 "./crush" "${pkgdir}/usr/bin/crush" + # license + mkdir -p "${pkgdir}/usr/share/licenses/crush/" + install -Dm644 ./LICENSE* "${pkgdir}/usr/share/licenses/crush/" + # completions + mkdir -p "${pkgdir}/usr/share/bash-completion/completions/" + mkdir -p "${pkgdir}/usr/share/zsh/site-functions/" + mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/" + install -Dm644 "./completions/crush.bash" "${pkgdir}/usr/share/bash-completion/completions/crush" + install -Dm644 "./completions/crush.zsh" "${pkgdir}/usr/share/zsh/site-functions/_crush" + install -Dm644 "./completions/crush.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/crush.fish" + # man pages + install -Dm644 "./manpages/crush.1.gz" "${pkgdir}/usr/share/man/man1/crush.1.gz" + # readme + mkdir -pv "${pkgdir}/usr/share/doc/crush/" + install -Dm644 README* "${pkgdir}/usr/share/doc/crush/" + aurs: - private_key: "{{ .Env.AUR_KEY }}" git_url: "ssh://aur@aur.archlinux.org/crush-bin.git" diff --git a/go.sum b/go.sum index 8c5812fd2277203aa2075d0622cc4b1777925529..75e178374abd7f88b2f779ffbef342d822a84431 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,6 @@ github.com/charlievieth/fastwalk v1.0.11 h1:5sLT/q9+d9xMdpKExawLppqvXFZCVKf6JHnr github.com/charlievieth/fastwalk v1.0.11/go.mod h1:yGy1zbxog41ZVMcKA/i8ojXLFsuayX5VvwhQVoj9PBI= github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250716191546-1e2ffbbcf5c5 h1:GTcMIfDQJKyNKS+xVt7GkNIwz+tBuQtIuiP50WpzNgs= github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250716191546-1e2ffbbcf5c5/go.mod h1:6HamsBKWqEC/FVHuQMHgQL+knPyvHH55HwJDHl/adMw= -github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250724172607-5ba56e2bec69 h1:nXLMl4ows2qogDXhuEtDNgFNXQiU+PJer+UEBsQZuns= -github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250724172607-5ba56e2bec69/go.mod h1:XIQ1qQfRph6Z5o2EikCydjumo0oDInQySRHuPATzbZc= github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250730165737-56ff7146d52d h1:YMXLZHSo8DjytVY/b5dK8LDuyQsVUmBK3ydQMpu2Ui4= github.com/charmbracelet/bubbletea/v2 v2.0.0-beta.4.0.20250730165737-56ff7146d52d/go.mod h1:XIQ1qQfRph6Z5o2EikCydjumo0oDInQySRHuPATzbZc= github.com/charmbracelet/catwalk v0.3.5 h1:ChMvA5ooTNZhDKFagmGNQgIZvZp8XjpdaJ+cDmhgCgA=