patch sonic (properly)

This commit is contained in:
Para Dox
2025-06-14 13:14:17 +07:00
parent 8986887888
commit 7bbc5eecb9
4 changed files with 15 additions and 2 deletions

View File

@@ -1,12 +1,19 @@
FROM golang:1.22 as builder
ARG VERSION
ARG COMMIT
ARG REPO
ARG PATCH
RUN apt-get update && apt-get install -y git musl-dev make
RUN cd /go && git clone ${REPO:-https://github.com/0xsoniclabs/sonic.git} sonic && cd sonic && git fetch --tags && git checkout -b ${VERSION} tags/${VERSION}
RUN cd /go && git clone ${REPO:-https://github.com/0xsoniclabs/sonic.git} sonic && cd sonic && git fetch --tags
RUN if [ -n "$COMMIT" ]; then \
git checkout -b ${VERSION} ${COMMIT}; \
else \
git checkout -b ${VERSION} tags/${VERSION}; \
fi
COPY ${PATCH:-empty.patch} /tmp/my-patch.patch