# Template file for 'circleci-cli' pkgname=circleci-cli 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.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=c9f7bb5a81a173b4c87c9343c7bf12412f9e45ffa742478ffde74a9b10e879da _completions="bash zsh" pre_build() { packr2 } 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() { vlicense LICENSE # 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 }