From 883d5d96a7ea85358c11336d4be0a2aa499d5681 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 20 Nov 2020 17:55:48 +0000 Subject: [PATCH] Nest other layers inside on automation This changes the nesting style because some CI / CD systems do not allow moving to a directory above the checkout for the primary repo (`react-sdk` in this case). Part of https://github.com/vector-im/element-web/issues/12624 --- scripts/ci/app-tests.sh | 2 +- scripts/ci/end-to-end-tests.sh | 4 ++-- scripts/ci/layered.sh | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/ci/app-tests.sh b/scripts/ci/app-tests.sh index 3ca4d8ec69..97e54dce66 100755 --- a/scripts/ci/app-tests.sh +++ b/scripts/ci/app-tests.sh @@ -7,6 +7,6 @@ set -ev scripts/ci/layered.sh -cd ../element-web +cd element-web yarn build:genfiles # so the tests can run. Faster version of `build` yarn test diff --git a/scripts/ci/end-to-end-tests.sh b/scripts/ci/end-to-end-tests.sh index 65cd3f6c21..edb8870d8e 100755 --- a/scripts/ci/end-to-end-tests.sh +++ b/scripts/ci/end-to-end-tests.sh @@ -15,10 +15,10 @@ trap 'handle_error' ERR echo "--- Building Element" scripts/ci/layered.sh -cd ../element-web +cd element-web element_web_dir=`pwd` CI_PACKAGE=true yarn build -cd ../matrix-react-sdk +cd .. # run end to end tests pushd test/end-to-end-tests ln -s $element_web_dir element/element-web diff --git a/scripts/ci/layered.sh b/scripts/ci/layered.sh index 51d285aff6..306f9c9974 100755 --- a/scripts/ci/layered.sh +++ b/scripts/ci/layered.sh @@ -1,28 +1,28 @@ #!/bin/bash -# Creates an environment similar to one that element-web would expect for -# development. This means going one directory up (and assuming we're in -# a directory like /workdir/matrix-react-sdk) and putting element-web and -# the js-sdk there. +# Creates a layered environment with the full repo for the app and SDKs cloned +# and linked. -cd ../ # Assume we're at something like /workdir/matrix-react-sdk +# Note that this style is different from the recommended developer setup: this +# file nests js-sdk and element-web inside react-sdk, 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 (react-sdk in this case). # Set up the js-sdk first -matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-js-sdk +scripts/fetchdep.sh matrix-org matrix-js-sdk pushd matrix-js-sdk yarn link yarn install popd # Now set up the react-sdk -pushd matrix-react-sdk yarn link matrix-js-sdk yarn link yarn install -popd # Finally, set up element-web -matrix-react-sdk/scripts/fetchdep.sh vector-im element-web +scripts/fetchdep.sh vector-im element-web pushd element-web yarn link matrix-js-sdk yarn link matrix-react-sdk