fix the patch thingy

This commit is contained in:
Sebastian
2024-11-30 13:16:30 +01:00
parent dcbd9d2e81
commit 4abbf293f8
3 changed files with 14 additions and 17 deletions

View File

@@ -11,10 +11,13 @@ RUN git clone $OP_REPO --branch op-node/$OP_VERSION --single-branch . && \
git switch -c branch-$OP_VERSION
# Apply patch if provided and valid
RUN if [[ -n "$OP_PATCH" && -f "$OP_PATCH" ]]; then \
git apply "$OP_PATCH"; \
COPY ${OP_PATCH:-empty.patch} /tmp/my-patch.patch
RUN if [ -n "$OP_PATCH" ]; then \
echo "Using patch file: $OP_PATCH"; \
cd op-node && git apply --verbose /tmp/my-patch.patch || \
(echo "Patch failed to apply!" && exit 1); \
else \
echo "No valid patch file found in \$OP_PATCH"; \
echo "No patch file provided. Skipping."; \
fi
RUN cd op-node && \
@@ -46,4 +49,4 @@ COPY --from=geth /app/build/bin/geth ./
COPY geth-entrypoint .
COPY op-node-entrypoint .
COPY sepolia ./sepolia
COPY mainnet ./mainnet
COPY mainnet ./mainnet