Skip to content

Commit cfa6960

Browse files
authored
Update Dockerfile to relax version constraints for all extension package.json files (vignesh07#17)
This change broadens the version relaxation patch to include all package.json files in the extensions directory, accommodating the workspace protocol. The previous implementation was limited to specific files.
1 parent 655c8f7 commit cfa6960

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

Dockerfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@ ARG CLAWDBOT_GIT_REF=main
2525
RUN git clone --depth 1 --branch "${CLAWDBOT_GIT_REF}" https://github.com/clawdbot/clawdbot.git .
2626

2727
# Patch: relax version requirements for packages that may reference unpublished versions.
28-
# Scope this narrowly to avoid surprising dependency mutations.
28+
# Apply to all extension package.json files to handle workspace protocol (workspace:*).
2929
RUN set -eux; \
30-
for f in \
31-
./extensions/memory-core/package.json \
32-
./extensions/googlechat/package.json \
33-
; do \
34-
if [ -f "$f" ]; then \
35-
sed -i -E 's/"clawdbot"[[:space:]]*:[[:space:]]*">=[^"]+"/"clawdbot": "*"/g' "$f"; \
36-
fi; \
30+
find ./extensions -name 'package.json' -type f | while read -r f; do \
31+
sed -i -E 's/"clawdbot"[[:space:]]*:[[:space:]]*">=[^"]+"/"clawdbot": "*"/g' "$f"; \
32+
sed -i -E 's/"clawdbot"[[:space:]]*:[[:space:]]*"workspace:[^"]+"/"clawdbot": "*"/g' "$f"; \
3733
done
3834

3935
RUN pnpm install --no-frozen-lockfile

0 commit comments

Comments
 (0)