diff options
author | Jonny Stoten | 2020-04-30 10:48:30 +0100 |
---|---|---|
committer | Jonny Stoten | 2020-04-30 10:48:43 +0100 |
commit | 7b8305d9971aafd61ac961fe6b75e8400ae5041b (patch) | |
tree | 9030c4ccd8eb62c16769a0269bb0a8cd7e5e5cd4 | |
parent | cf483452fba1a4be8d4c4fe68504362cc4b124f4 (diff) | |
download | aur-7b8305d9971aafd61ac961fe6b75e8400ae5041b.tar.gz |
Add script for automating new releases
-rw-r--r-- | PKGBUILD.template | 18 | ||||
-rwxr-xr-x | release.sh | 23 |
2 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD.template b/PKGBUILD.template new file mode 100644 index 000000000000..1ad60bf7a08e --- /dev/null +++ b/PKGBUILD.template @@ -0,0 +1,18 @@ +# Maintainer: Jonny Stoten <jonny@jonnystoten.com> + +pkgname=stripe-cli-bin +pkgver=VERSION +pkgrel=1 +pkgdesc="A command-line tool for Stripe" +arch=("x86_64") +url="https://stripe.com/docs/stripe-cli" +license=("Apache") +depends=() +provides=() +conflicts=(stripe-cli) +source=("https://github.com/stripe/stripe-cli/releases/download/v$pkgver/stripe_${pkgver}_linux_x86_64.tar.gz") +sha256sums=('CHECKSUM') + +package() { + install -Dm 0755 stripe "$pkgdir/usr/bin/stripe" +} diff --git a/release.sh b/release.sh new file mode 100755 index 000000000000..50a2f2505298 --- /dev/null +++ b/release.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -euo pipefail + +VERSION=$1 + +echo "Making a new release of stripe-cli $VERSION" + +echo "Getting checksum..." +CHECKSUM=$(curl -L https://github.com/stripe/stripe-cli/releases/download/v${VERSION}/stripe-checksums.txt | grep linux_x86_64.tar.gz | awk '{print $1}') + +echo "Building PKGBUILD..." +sed "s/VERSION/$VERSION/g;s/CHECKSUM/$CHECKSUM/g" PKGBUILD.template > PKGBUILD + +echo "Making and installing package locally..." +makepkg -i + +echo "Generating .SRCINFO..." +makepkg --printsrcinfo > .SRCINFO + +echo "Committing to git..." +git commit -am "Release of $VERSION" + +echo "Test that the new version works with stripe -v, then push" |