From fe69988c57088027167aa98c32cfe48d20d0e54c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 19 Jan 2026 00:18:24 +0900 Subject: feat(claude-code): upgrade to 2.1.12 --- justfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'justfile') diff --git a/justfile b/justfile index 938a933..0ac180f 100644 --- a/justfile +++ b/justfile @@ -1,2 +1,23 @@ commit-upgrade PKG VERSION: git commit -m 'feat({{PKG}}): upgrade to {{VERSION}}' + +update-claude-code: + #!/usr/bin/env bash + set -eu + + export NIXPKGS_ALLOW_UNFREE=1 + LATEST_VERSION=$(npm view @anthropic-ai/claude-code version) + + sed -i 's|version = ".*"|version = "'"$LATEST_VERSION"'"|' pkgs/claude-code/default.nix + sed -i 's|hash = ".*"|hash = ""|' pkgs/claude-code/default.nix + sed -i 's|npmDepsHash = ".*"|npmDepsHash = ""|' pkgs/claude-code/default.nix + + sed -i '1,10s|"version": ".*"|"version": "'"$LATEST_VERSION"'"|' pkgs/claude-code/package-lock.json + + HASH="$(nix build --impure ".#claude-code" 2>&1 | grep "got:" | awk '{ print $2 }')" + sed -i 's|hash = ""|hash = "'"$HASH"'"|' pkgs/claude-code/default.nix + + NPM_DEPS_HASH="$(nix build --impure ".#claude-code" 2>&1 | grep "got:" | awk '{ print $2 }')" + sed -i 's|npmDepsHash = ""|npmDepsHash = "'"$NPM_DEPS_HASH"'"|' pkgs/claude-code/default.nix + + nix build --impure ".#claude-code" -- cgit v1.3-1-g0d28