blob: ede1f4360ed5285e9047a4a52344394dbc19207f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nodePackages.npm nix-update
# https://github.com/NixOS/nixpkgs/blob/3016b4b15d13f3089db8a41ef937b13a9e33a8df/pkgs/by-name/cl/claude-code/update.sh
set -euo pipefail
version=$(npm view @anthropic-ai/claude-code version)
# Generate updated lock file
cd "$(dirname "${BASH_SOURCE[0]}")"
npm i --package-lock-only @anthropic-ai/claude-code@"$version"
rm -f package.json
# Update version and hashes
cd -
nix-update claude-code --version "$version"
|