From b0e626ff1664e71a02f5628987e2f9c7548b71e4 Mon Sep 17 00:00:00 2001 From: TudorAndrei Date: Fri, 10 Oct 2025 23:32:10 +0300 Subject: [PATCH] Fix sed commands in update-cursor.sh to properly update all fields - Fixed version update to not require specific comment - Fixed URL and SHA256 updates to target correct block (cursor = buildCursor {) - All three fields (version, url, sha256) now update correctly --- update-cursor.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update-cursor.sh b/update-cursor.sh index 034a0c4..7fffc0d 100755 --- a/update-cursor.sh +++ b/update-cursor.sh @@ -61,9 +61,9 @@ update_flake() { cp "$FLAKE_FILE" "$FLAKE_FILE.backup" # Update flake.nix - be more specific to avoid replacing nixpkgs URL - sed -i "s/version = \"[^\"]*\" # Will be updated by GitHub Actions/version = \"$version\"/" "$FLAKE_FILE" - sed -i "/buildCursor = {/,/};/s|url = \"[^\"]*\"|url = \"$actual_url\"|" "$FLAKE_FILE" - sed -i "/buildCursor = {/,/};/s/sha256 = \"[^\"]*\"/sha256 = \"$sha256\"/" "$FLAKE_FILE" + sed -i "s/version = \"[^\"]*\"/version = \"$version\"/" "$FLAKE_FILE" + sed -i "/cursor = buildCursor {/,/};/s|url = \"[^\"]*\"|url = \"$actual_url\"|" "$FLAKE_FILE" + sed -i "/cursor = buildCursor {/,/};/s/sha256 = \"[^\"]*\"/sha256 = \"$sha256\"/" "$FLAKE_FILE" echo "Updated flake.nix with version $version" }