Minor tweaks to the layered.sh build script (#34300)
I struggled to understand what was going on in my failing build. Clean up some comments, and try to make the console output a bit more helpful.
This commit is contained in:
+6
-4
@@ -4,7 +4,7 @@ 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
|
||||
# matching branches of matrix-js-sdk so that changes can be tested
|
||||
# in element-web.
|
||||
|
||||
# Note that this style is different from the recommended developer setup: this
|
||||
@@ -22,13 +22,15 @@ export PR_REPO=element-web
|
||||
|
||||
js_sdk_dep=$(jq -r '.dependencies["matrix-js-sdk"]' < $(pnpm -w root)/../apps/web/package.json)
|
||||
|
||||
# Set up the js-sdk first (unless package.json pins a specific version)
|
||||
# Set up the js-sdk (unless package.json pins a specific version)
|
||||
if [ "$js_sdk_dep" = "github:matrix-org/matrix-js-sdk#develop" ]; then
|
||||
echo "layered.sh: Cloning matching branch of matrix-js-sdk"
|
||||
scripts/fetchdep.sh matrix-org matrix-js-sdk develop
|
||||
|
||||
if [ -n "$JS_SDK_GITHUB_BASE_REF" ]; then
|
||||
echo "layered.sh: Switching js-sdk to $JS_SDK_GITHUB_BASE_REF"
|
||||
git -C matrix-js-sdk fetch --depth 1 origin $JS_SDK_GITHUB_BASE_REF
|
||||
git -C matrix-js-sdk checkout $JS_SDK_GITHUB_BASE_REF
|
||||
git -C matrix-js-sdk -c advice.detachedHead=false checkout $JS_SDK_GITHUB_BASE_REF
|
||||
fi
|
||||
pnpm -C matrix-js-sdk install --frozen-lockfile --ignore-scripts
|
||||
|
||||
@@ -36,5 +38,5 @@ if [ "$js_sdk_dep" = "github:matrix-org/matrix-js-sdk#develop" ]; then
|
||||
pnpm -C apps/web link ./matrix-js-sdk
|
||||
pnpm link ./matrix-js-sdk
|
||||
else
|
||||
echo "Skipping matrix-js-sdk fetch and link as package.json pins $js_sdk_dep"
|
||||
echo "layered.sh: Skipping matrix-js-sdk fetch and link as package.json pins $js_sdk_dep"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user