diff --git a/package.json b/package.json index 2ba1cbdb24..13d974eb3d 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,8 @@ "patches-reapply": "cd ./yarn-linked-dependencies/matrix-js-sdk; git checkout .; cd ../..; ./scripts/tchap/apply_patches.sh", "patch-make": "node scripts/tchap/makePatch.ts", "analyse:webpack-bundles": "webpack-bundle-analyzer webpack-stats.json webapp", - "update:jitsi": "curl -s https://meet.element.io/libs/external_api.min.js > ./res/jitsi_external_api.min.js" + "update:jitsi": "curl -s https://meet.element.io/libs/external_api.min.js > ./res/jitsi_external_api.min.js", + "postinstall": "./scripts/tchap/postinstall.sh" }, "resolutions": { "@types/react-dom": "17.0.21", diff --git a/scripts/tchap/install-yarn-linked-repositories.sh b/scripts/tchap/install-yarn-linked-repositories.sh index bba77f1d63..08a01d0f01 100755 --- a/scripts/tchap/install-yarn-linked-repositories.sh +++ b/scripts/tchap/install-yarn-linked-repositories.sh @@ -42,30 +42,13 @@ rm -R examples/ popd -# :TCHAP: we don't use this. -# Also set up matrix-analytics-events so we get the latest from -# the main branch or a branch with matching name -#./scripts/fetchdep.sh matrix-org matrix-analytics-events main -#pushd matrix-analytics-events -#yarn link -#yarn install --pure-lockfile -#yarn build:ts -#popd - -# # Now set up the react-sdk -# ../scripts/tchap/fetchdep.with.version.sh matrix-org matrix-react-sdk $MATRIX_REACT_SDK_VERSION -# pushd matrix-react-sdk -# yarn unlink # :TCHAP: for local build, undo previous links if present. -# yarn link -# yarn link matrix-js-sdk -# #yarn link @matrix-org/analytics-events # :TCHAP: we don't use this -# yarn install --pure-lockfile -# popd -cd ../linked-dependencies/matrix-react-sdk +cd ../linked-dependencies +pushd matrix-react-sdk yarn unlink # :TCHAP: for local build, undo previous links if present. yarn link yarn link matrix-js-sdk yarn install --pure-lockfile +popd # :TCHAP: yarn-link modules diff --git a/scripts/tchap/postinstall.sh b/scripts/tchap/postinstall.sh new file mode 100755 index 0000000000..88d8d00839 --- /dev/null +++ b/scripts/tchap/postinstall.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -x + +# This postinstall script is to make sure we use the linked-dependencies module for matrx-react-sdk + +./scripts/tchap/apply_patches.sh + +cd linked-dependencies +pushd matrix-react-sdk +yarn unlink # :TCHAP: for local build, undo previous links if present. +yarn link +yarn install --pure-lockfile +popd + +cd .. +# Link the layers into element-web +yarn link matrix-react-sdk +