Apply patches to the ckan Dockerfile

This commit is contained in:
mjanez 2024-04-12 12:49:05 +00:00 committed by GitHub
parent b7bc353eb5
commit b843de1946
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 6 deletions

View File

@ -67,12 +67,19 @@ COPY setup/who.ini ./
COPY patches patches
RUN for d in $APP_DIR/patches/*; do \
if [ -d $d ]; then \
for f in `ls $d/*.patch | sort -g`; do \
cd $SRC_DIR/`basename "$d"` && echo "$0: Applying patch $f to $SRC_DIR/`basename $d`" && patch -p1 < "$f"; \
done; \
fi; \
done
if [ -d $d ]; then \
for f in `ls $d/*.patch | sort -g`; do \
cd $SRC_DIR/`basename "$d"` && \
if patch -R --dry-run -p1 < "$f"; then \
echo "$0: Patch $f has already been applied or reversed, skipping..."; \
else \
echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; \
sed -i 's/\r$//' "$f" && \
patch -p1 < "$f" ; \
fi \
done ; \
fi ; \
done
# Workers
## Update start_ckan.sh with custom workers

View File

@ -32,6 +32,7 @@ RUN for d in $APP_DIR/patches/*; do \
echo "$0: Patch $f has already been applied or reversed, skipping..."; \
else \
echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; \
sed -i 's/\r$//' "$f" && \
patch -p1 < "$f" ; \
fi \
done ; \