From a35222edf7f6503b1cb291255bec9215af4b0dac Mon Sep 17 00:00:00 2001 From: Gabriel Sanches Date: Sat, 27 Mar 2021 18:28:06 -0300 Subject: [PATCH] circleci-cli: update to 0.1.15195. This update provides shell completion for Bash and ZSH. Commit information has been removed for ease of maintenance. --- srcpkgs/circleci-cli/template | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/srcpkgs/circleci-cli/template b/srcpkgs/circleci-cli/template index f0eac722b454..1932703e601b 100644 --- a/srcpkgs/circleci-cli/template +++ b/srcpkgs/circleci-cli/template @@ -1,17 +1,21 @@ # Template file for 'circleci-cli' pkgname=circleci-cli -version=0.1.15108 +version=0.1.15195 revision=1 build_style=go +build_helper=qemu go_import_path=github.com/CircleCI-Public/${pkgname} -go_ldflags="-s -w -X github.com/CircleCI-Public/${pkgname}/version.Version=${version} -X github.com/CircleCI-Public/${pkgname}/version.Commit=cf6a918 -X github.com/CircleCI-Public/${pkgname}/version.packageManager=xbps" +go_ldflags="-s -w + -X github.com/CircleCI-Public/${pkgname}/version.Version=${version} + -X github.com/CircleCI-Public/${pkgname}/version.packageManager=xbps" hostmakedepends="packr2" short_desc="Use CircleCI from the command line" maintainer="Gabriel Sanches " license="MIT" homepage="https://circleci-public.github.io/circleci-cli/" distfiles="https://github.com/CircleCI-Public/${pkgname}/archive/v${version}.tar.gz" -checksum=930bc37c181389cebbbcf9a2b836eb55f8c7ebcb9e853666ce5f4213b084a551 +checksum=c9f7bb5a81a173b4c87c9343c7bf12412f9e45ffa742478ffde74a9b10e879da +_completions="bash zsh" pre_build() { packr2 @@ -19,6 +23,12 @@ pre_build() { post_build() { packr2 clean + + # Generate completion for shells. + cli=$(find $GOPATH/bin -name $pkgname) + for shell in $_completions; do + vtargetrun $cli completion $shell > ${pkgname}.${shell} + done } post_install() { @@ -26,4 +36,8 @@ post_install() { # Rename the binary according to CircleCI's own releases. mv ${DESTDIR}/usr/bin/circleci{-cli,} + + for shell in $_completions; do + vcompletion ${pkgname}.${shell} $shell circleci + done }