coryd.dev/scripts/update.sh

19 lines
909 B
Bash
Executable file

#!/bin/bash
set -eu
echo "📦 Updating PHP packages..."
composer update --no-progress --no-interaction 2>&1 | grep -Ev \
"^(Writing lock file|Generating optimized autoload files|Loading composer|Nothing to modify|Use the \`composer fund\`|No security vulnerability|Installing dependencies from lock file|Package operations|[0-9]+ packages you are using are looking for funding)"
echo "🗳️ Updating root JS packages..."
npm update --loglevel=silent --no-audit --no-fund | grep -v "up to date" || :
echo "🗃️ Updating CLI JS packages..."
npm --prefix cli update --loglevel=silent --no-audit --no-fund | grep -v "up to date" || :
echo "🔍 Checking for new versions (root)..."
ncu -u --loglevel silent 2>/dev/null | grep -v "All dependencies match" || :
echo "🔍 Checking for new versions (cli)..."
ncu -u --cwd "./cli" --loglevel silent 2>/dev/null | grep -v "All dependencies match" || :