Commit c7d414bd75

c7d414bd75d49e4a5a923fee6aa677a891017029

parent: 29aa2ab006

Unsigned

Wraient <wraient.911@gmail.com> · 2026-04-18 17:01 UTC

Enforce checksummed AUR PKGBUILD template

Layout: unified · split

.github/workflows/update-aur.yml +29 −4
@@ -137,10 +137,32 @@ jobs:
137 run: | 137 run: |
138 set -euo pipefail 138 set -euo pipefail
139 139
140 sed -i "s/^pkgver=.*/pkgver=${{ steps.release.outputs.version }}/" PKGBUILD 140 cat > PKGBUILD <<EOF
141 sed -i "s/^pkgrel=.*/pkgrel=1/" PKGBUILD 141# Maintainer: Wraient <rushikeshwastaken@gmail.com>
142 sed -i "s|^source=.*|source=(\"https://github.com/Wraient/curd/releases/download/v\${pkgver}/curd-linux-x86_64\")|" PKGBUILD 142pkgname='curd'
143 sed -i "s|^sha256sums=.*|sha256sums=('${{ steps.release.outputs.sha256 }}')|" PKGBUILD 143pkgver=${{ steps.release.outputs.version }}
144pkgrel=1
145pkgdesc="Watch anime in CLI with AniList Tracking, Discord RPC, Intro/Outro/Filler/Recap Skipping, etc."
146arch=('x86_64')
147url="https://github.com/Wraient/curd"
148license=('GPL')
149depends=('mpv' 'rofi' 'ueberzugpp')
150provides=('curd')
151conflicts=('curd')
152source=("https://github.com/Wraient/curd/releases/download/v\${pkgver}/curd-linux-x86_64")
153sha256sums=('${{ steps.release.outputs.sha256 }}')
154
155package() {
156 install -Dm755 "\$srcdir/curd-linux-x86_64" "\$pkgdir/usr/bin/curd"
157}
158EOF
159
160 # Fail fast if checksum/source/install-target drift.
161 grep -q '^source=(' PKGBUILD
162 grep -q '^sha256sums=(' PKGBUILD
163 grep -q 'curd-linux-x86_64' PKGBUILD
164 grep -q 'install -Dm755 "\$srcdir/curd-linux-x86_64" "\$pkgdir/usr/bin/curd"' PKGBUILD
165 bash -n PKGBUILD
144 166
145 set +u 167 set +u
146 # shellcheck disable=SC1091 168 # shellcheck disable=SC1091
@@ -180,6 +202,9 @@ jobs:
180 for pkg in "${pkgname[@]-}"; do [ -n "$pkg" ] && printf 'pkgname = %s\n' "$pkg"; done 202 for pkg in "${pkgname[@]-}"; do [ -n "$pkg" ] && printf 'pkgname = %s\n' "$pkg"; done
181 } > .SRCINFO 203 } > .SRCINFO
182 204
205 grep -Fq "pkgver = ${{ steps.release.outputs.version }}" .SRCINFO
206 grep -Fq "sha256sums = ${{ steps.release.outputs.sha256 }}" .SRCINFO
207
183 - name: Commit and push to AUR 208 - name: Commit and push to AUR
184 working-directory: aur-curd 209 working-directory: aur-curd
185 env: 210 env: