Files
blap/scripts/layered.sh
T
David Baker d584b8b9a3 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
2026-02-26 09:06:44 +00:00

41 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
set -ex
# Creates a layered environment with the full repo for the app and SDKs cloned
# and linked. This gives an element-web dev environment ready to build with
# matching branches of react-sdk's dependencies so that changes can be tested
# in element-web.
# Note that this style is different from the recommended developer setup: this
# file nests js-sdk inside element-web, while the local
# development setup places them all at the same level. We are nesting them here
# because some CI systems do not allow moving to a directory above the checkout
# for the primary repo (element-web in this case).
# Install dependencies
pnpm install --frozen-lockfile
# Pass appropriate repo to fetchdep.sh
export PR_ORG=element-hq
export PR_REPO=element-web
js_sdk_dep=`jq -r '.dependencies["matrix-js-sdk"]' < package.json`
# 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
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
pnpm install --frozen-lockfile $@