From a999b4250e1f0e57e4c28ed184daead3d8fa4fc4 Mon Sep 17 00:00:00 2001 From: Spoffy Date: Mon, 8 Jul 2024 14:03:18 -0400 Subject: [PATCH] Fixes OSS including EE by providing empty ext dir --- .github/workflows/docker_latest.yml | 4 ++-- .gitignore | 3 +++ buildtools/checkout-ext-directory.sh | 1 + ext/README.md | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 ext/README.md diff --git a/.github/workflows/docker_latest.yml b/.github/workflows/docker_latest.yml index b3adb7ef..d72682cf 100644 --- a/.github/workflows/docker_latest.yml +++ b/.github/workflows/docker_latest.yml @@ -87,7 +87,7 @@ jobs: load: true tags: ${{ env.DOCKER_HUB_OWNER }}/${{ matrix.image.name }}:${{ env.TAG }} cache-from: type=gha - build-contexts: ${{ matrix.image.name != 'grist-oss' && 'ext=ext' || '' }} + build-contexts: ext=ext - name: Use Node.js ${{ matrix.node-version }} for testing if: ${{ !inputs.disable_tests }} @@ -140,7 +140,7 @@ jobs: tags: ${{ env.DOCKER_HUB_OWNER }}/${{ matrix.image.name }}:${{ env.TAG }} cache-from: type=gha cache-to: type=gha,mode=max - build-contexts: ${{ matrix.image.name != 'grist-oss' && 'ext=ext' || '' }} + build-contexts: ext=ext - name: Push Enterprise to Docker Hub if: ${{ matrix.image.name == 'grist' }} diff --git a/.gitignore b/.gitignore index 1d2fa534..3ec43ff9 100644 --- a/.gitignore +++ b/.gitignore @@ -80,3 +80,6 @@ xunit.xml .clipboard.lock **/_build + +# ext directory can be overwritten +ext/** diff --git a/buildtools/checkout-ext-directory.sh b/buildtools/checkout-ext-directory.sh index 6861b9e2..81753e31 100755 --- a/buildtools/checkout-ext-directory.sh +++ b/buildtools/checkout-ext-directory.sh @@ -14,5 +14,6 @@ pushd $repo git sparse-checkout set ext git checkout popd +rm -rf ./ext mv $repo/ext . rm -rf $repo diff --git a/ext/README.md b/ext/README.md new file mode 100644 index 00000000..09f9848c --- /dev/null +++ b/ext/README.md @@ -0,0 +1,5 @@ +`ext` is a directory that allows derivatives of Grist core to be created, without modifying any of the base files. + +Files placed in here should be new files, or replacing files in the `stubs` directory. + +When compiling, Typescript resolves files in `ext` before files in `stubs`, using the `ext` file instead (if it exists).