From d584b8b9a3ef16c8d346f2c96b1da483e440b876 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 26 Feb 2026 10:06:44 +0100 Subject: [PATCH] Do non-layered builds when running on master (second version) (#32624) * Do non-layered builds when running on master (second version) Hopefully this will fix the release as it looks like we've introduced backwards incompat changes in the js-sdk between the RC and the release, which have now broken as we were incorrectly using the develop js-sdk for release builds. Replaces https://github.com/element-hq/element-web/pull/32623 * remove matrix-analytics-events branch match * Unused line --- scripts/layered.sh | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/scripts/layered.sh b/scripts/layered.sh index cee172e6cf..696a25f582 100755 --- a/scripts/layered.sh +++ b/scripts/layered.sh @@ -20,27 +20,21 @@ pnpm install --frozen-lockfile export PR_ORG=element-hq export PR_REPO=element-web -# Set up the js-sdk first -scripts/fetchdep.sh matrix-org matrix-js-sdk develop -pushd matrix-js-sdk -[ -n "$JS_SDK_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF -pnpm link -pnpm install --frozen-lockfile -popd +js_sdk_dep=`jq -r '.dependencies["matrix-js-sdk"]' < package.json` -# Also set up matrix-analytics-events for branch with matching name -scripts/fetchdep.sh matrix-org matrix-analytics-events -# We don't pass a default branch so cloning may fail when we are not in a PR -# This is expected as this project does not share a release cycle but we still branch match it -if [ -d matrix-analytics-events ]; then - pushd matrix-analytics-events +# Set up the js-sdk first (unless package.json pins a specific version) +if [ "$js_sdk_dep" = "github:matrix-org/matrix-js-sdk#develop" ]; then + scripts/fetchdep.sh matrix-org matrix-js-sdk develop + pushd matrix-js-sdk + [ -n "$JS_SDK_GITHUB_BASE_REF" ] && git fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF && git checkout $JS_SDK_GITHUB_BASE_REF pnpm link pnpm install --frozen-lockfile - pnpm build:ts popd + + # Link into into element-web + pnpm link matrix-js-sdk +else + echo "Skipping matrix-js-sdk fetch and link as package.json pins $js_sdk_dep" fi -# Link the layers into element-web -pnpm link matrix-js-sdk -[ -d matrix-analytics-events ] && pnpm link @matrix-org/analytics-events pnpm install --frozen-lockfile $@