Skip to content

Commit

Permalink
fix: handle bug with usage-bin aur script
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Sep 27, 2024
1 parent 131fc97 commit 6e4b7a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tasks/bump-aur
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/usr/bin/env bash
set -euxo pipefail
#USAGE arg "pkgname"
env

pkgname="${usage_pkgname:-}"
USAGE_VERSION=v$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "usage-cli") | .version')

if [ ! -d aur ]; then
git clone ssh://aur@aur.archlinux.org/$usage_pkgname.git aur
if [ ! -d "aur-$pkgname" ]; then
git clone "ssh://aur@aur.archlinux.org/$pkgname.git aur"
fi
git -C aur pull

if [ "$usage_pkgname" == "usage" ]; then
if [ "$pkgname" == "usage" ]; then
SOURCE_SHA512=$(curl -fsSL "https://github.com/jdx/usage/archive/$USAGE_VERSION.tar.gz" | sha512sum | awk '{print $1}')
SHA512="$SOURCE_SHA512"
cat >aur/PKGBUILD <<EOF
Expand Down Expand Up @@ -65,7 +65,7 @@ sha512sums = $SHA512
pkgname = usage
EOF
elif [ "$usage_pkgname" == "usage-bin" ]; then
elif [ "$pkgname" == "usage-bin" ]; then
SHA512=$(curl -fsSL "https://github.com/jdx/usage/archive/$USAGE_VERSION.tar.gz" | sha512sum | awk '{print $1}')
cat >aur/PKGBUILD <<EOF
# Maintainer: Jeff Dickey <releases-usage at jdx dot dev>
Expand Down Expand Up @@ -124,4 +124,4 @@ git diff --cached
git commit -m "usage ${USAGE_VERSION#v}"
if [ "$DRY_RUN" == false ]; then
git push
fi
fi

0 comments on commit 6e4b7a7

Please sign in to comment.