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
This commit is contained in:
David Baker
2026-02-26 10:06:44 +01:00
committed by GitHub
parent 6464bcc7a1
commit d584b8b9a3
+11 -17
View File
@@ -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 $@