Skip to content

Commit d46e73d

Browse files
authored
Improve SVG fill color update command
1 parent c63d164 commit d46e73d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/paint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ jobs:
6060
fi
6161
6262
# Update SVG
63-
sed -i "s/id=\"$COORD\" fill=\"[^\"]*\"/id=\"$COORD\" fill=\"$COLOR\"/" map.svg
63+
sed -i "/id=\"$COORD\"/s/fill=\"#[A-Fa-f0-9]\{6\}\"/fill=\"$COLOR\"/" map.svg
64+
grep "$COORD" map.svg
6465
6566
# Update state
6667
NEW_USER_COOLDOWN=$((NOW + 86400))

0 commit comments

Comments
 (0)