-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Maintainer: tarball <bootctl@gmail.com> | ||
# Contributor: Giovanni Harting <539@idlegandalf.com> | ||
# Contributor: ny-a <nyaarch64@gmail..com> | ||
# Contributor: Jean Lucas <jean@4ray.co> | ||
# Contributor: Sam Whited <sam@samwhited.com> | ||
|
||
pkgname=stripe-cli | ||
pkgver=1.18.0 | ||
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=('500b56638d464f1f27d68c9cd0d113505c7bdc03b96e4f4b40c318f18fc8ca2abf83ee9c564752c5d1c8341e6ae62b875294e0f3ff94bc20453cbcb6ad3d9f14') | ||
|
||
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 | ||
} |