unwind/scripts/update

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
614 B
Text
Raw Normal View History

2024-05-10 00:13:01 +02:00
#!/bin/sh -eu
echo '
WARNING:
This script aggressively updates all packages to the latest version.
Be sure to run tests & check the application after this!
'
cd "$RUN_DIR"
[ -z "${DEBUG:-}" ] || set -x
2025-05-15 21:56:57 +02:00
# Uv
2024-05-10 00:13:01 +02:00
2025-05-15 21:56:57 +02:00
uv sync --upgrade
2024-05-10 00:13:01 +02:00
2025-05-15 21:56:57 +02:00
uv tree --outdated --no-dev \
| sed -nE 's/.*─ ([^ ]+) (v[^ ]+) \(latest: v([^)]+)\)/\1>=\3/p' \
| xargs uv add
2024-05-10 00:13:01 +02:00
2025-05-15 21:56:57 +02:00
uv tree --outdated --only-dev \
| sed -nE 's/.*─ ([^ ]+) (v[^ ]+) \(latest: v([^)]+)\)/\1>=\3/p' \
| xargs uv add --dev
2024-05-10 00:13:01 +02:00
# Npm
cd unwind-ui
npm update
npm outdated --json --silent \
| jq -r 'keys|map(@sh"\(.)@latest")|join("\n")' \
| xargs npm install