mirror of
https://github.com/archlinux/aur.git
synced 2026-02-08 05:02:00 +01:00
The default value for the NPM package to update was changed from `@github/copilot` to `@zed-industries/claude-code-acp`. This aligns the script with the current package being maintained or targeted by the update process.
23 lines
738 B
Bash
Executable file
23 lines
738 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Author: Chmouel Boudjnah <chmouel@chmouel.com>
|
|
set -eufo pipefail
|
|
NPM_PACKAGE="${NPM_PACKAGE:-@zed-industries/claude-code-acp}"
|
|
|
|
latest=$(curl -s "https://registry.npmjs.org/${NPM_PACKAGE}/latest" | jq -r '.version')
|
|
pkgversion=$(grep '^pkgver=' PKGBUILD)
|
|
pkgversion=${pkgversion#pkgver=}
|
|
|
|
if [[ ${pkgversion} != "${latest}" ]]; then
|
|
echo "Updating PKGBUILD from ${pkgversion} to ${latest}"
|
|
sed -i "s/pkgver=${pkgversion}/pkgver=${latest}/" PKGBUILD
|
|
else
|
|
echo
|
|
printf "\033[3;31mPKGBUILD is already up to date with version %s\033[0m\n" "${pkgversion}"
|
|
exit 0
|
|
fi
|
|
|
|
updpkgsums && makepkg --printsrcinfo >.SRCINFO
|
|
makepkg -srif
|
|
git commit -m "Bump to ${latest}" PKGBUILD .SRCINFO
|
|
git clean -f .
|
|
rm -f *tgz *zst
|