From e5850eb02e202b2f4c0fe56e51d04a1f213f1857 Mon Sep 17 00:00:00 2001 From: "iamcristye@outlook.com" Date: Thu, 16 Jun 2022 20:51:12 +0800 Subject: [PATCH] improvement: use `git am` instead of `cherry-pick` --- CHANGELOG.md | 2 ++ tutor/templates/build/openedx/Dockerfile | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d7e04b..5ba685a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ Every user-facing change should have an entry in this changelog. Please respect ## Unreleased +- [Improvement] Use `git am` instead of `cherry-pick` to simplify patching process. + ## v14.0.1 (2022-06-13) - [Bugfix] Fix missing tables on migration from maple ([#689](https://github.com/overhangio/tutor/issues/689)). (by @ibrmora) diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index d3db281..abc5b0d 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -38,7 +38,7 @@ RUN mkdir -p /openedx/edx-platform && \ git clone $EDX_PLATFORM_REPOSITORY --branch $EDX_PLATFORM_VERSION --depth 1 /openedx/edx-platform WORKDIR /openedx/edx-platform -# Identify tutor user to cherry-pick commits +# Identify tutor user to apply patches using git RUN git config --global user.email "tutor@overhang.io" \ && git config --global user.name "Tutor" @@ -49,10 +49,10 @@ RUN git config --global user.email "tutor@overhang.io" \ # Patch edx-platform # Fix broken "Pages" view in Studio # https://github.com/openedx/edx-platform/pull/30550 -RUN git fetch --depth=2 https://github.com/open-craft/edx-platform/ 3d54f284f82b61e693ad652d8d6e46a226fcb36d && git cherry-pick 3d54f284f82b61e693ad652d8d6e46a226fcb36d +RUN curl -fsSL https://github.com/open-craft/edx-platform/commit/3d54f284f82b61e693ad652d8d6e46a226fcb36d.patch | git am {%- endif %} -{# Example: RUN git fetch --depth=2 https://github.com/openedx/edx-platform && git cherry-pick #} +{# Example: RUN curl -fsSL https://github.com/openedx/edx-platform/commit/ | git am #} {{ patch("openedx-dockerfile-post-git-checkout") }} ###### Download extra locales to /openedx/locale/contrib/locale