Patches in Tutor plugins

Some technical question …

Is it possible to bundle patches together with a Tutor plugin and apply them, instead of loading them from github? See tutor-contrib-videoupload/openedx-dockerfile-post-git-checkout at master · insad/tutor-contrib-videoupload · GitHub for an example, I would like to bundle that patchfile with my plugin and apply, not having it downloaded from github.

You would need to do the following:

  1. include the git patch file as a template
  2. render it next to the openedx Dockerfile (see ENV_TEMPLATE_ROOTS and ENV_TEMPLATE_TARGETS)
  3. Copy it in the Dockerfile at build-time with COPY ./my.patch ./my.patch (using the same " **openedx-dockerfile-post-git-checkout" patch that you currently use)
  4. Apply it with RUN cat my.patch | git am

Thanks Régis, I’ll try this out.