# Maintainer: tarball # Contributor: Giovanni Harting <539@idlegandalf.com> # Contributor: ny-a # Contributor: Jean Lucas # Contributor: Sam Whited pkgname=stripe-cli pkgver=1.19.4 pkgrel=1 pkgdesc='CLI for Stripe' arch=(i686 x86_64 aarch64) url=https://github.com/stripe/stripe-cli license=(Apache) depends=(glibc) makedepends=(go git) source=($pkgname-$pkgver.tar.gz::https://github.com/stripe/stripe-cli/archive/v$pkgver.tar.gz) b2sums=('f1e00c9d59cc8283deec8c869dfcf5d622b658b64616b61a4499b63ae65a4702be2c9181eb2f6481ce01143d6014ac2527f66b92bef6e1772253845155aa8f6d') prepare() { cd $pkgname-$pkgver go mod download } build() { cd $pkgname-$pkgver go generate ./... go build \ -trimpath \ -buildmode=pie \ -mod=readonly \ -modcacherw \ -ldflags "-linkmode external -X github.com/stripe/stripe-cli/pkg/version.Version=$pkgver -extldflags \"${LDFLAGS}\"" \ -o stripe \ cmd/stripe/main.go } check() { cd $pkgname-$pkgver [[ "$(./stripe --version)" == "stripe version $pkgver" ]] # Tests are disabled until https://github.com/stripe/stripe-cli/issues/1020 is resolved #go test -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... -run . -timeout=2m } package() { cd $pkgname-$pkgver install -D stripe -t "$pkgdir"/usr/bin install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname cp -a docs "$pkgdir"/usr/share/doc/$pkgname }