aur/updpkg.sh
Chmouel Boudjnah e5dc93263c
fix: Update default NPM package to Claude Code ACP
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.
2025-09-29 09:26:27 +02:00

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