mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-15 20:54:59 +08:00
Reorder link and install steps
Take advantage of Yarn's preservation of links while installing and set up links first and install second. This should result in a small speedup since we no longer install the published SDKs just to replace them on the next line.
This commit is contained in:
parent
f6466802b0
commit
337ac2f6a0
23
README.md
23
README.md
@ -137,27 +137,26 @@ choice).
|
||||
Using `yarn` instead of `npm` is recommended. Please see the Yarn [install
|
||||
guide](https://yarnpkg.com/docs/install/) if you do not have it already.
|
||||
|
||||
Then check out the code and pull in dependencies:
|
||||
`matrix-react-sdk` depends on `matrix-js-sdk`. To make use of changes in the
|
||||
latter and to ensure tests run against the develop branch of `matrix-js-sdk`,
|
||||
you should set up `matrix-js-sdk`:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/matrix-org/matrix-react-sdk.git
|
||||
cd matrix-react-sdk
|
||||
git clone https://github.com/matrix-org/matrix-js-sdk
|
||||
cd matrix-js-sdk
|
||||
git checkout develop
|
||||
yarn link
|
||||
yarn install
|
||||
```
|
||||
|
||||
`matrix-react-sdk` depends on `matrix-js-sdk`. To make use of changes in the
|
||||
latter and to ensure tests run against the develop branch of `matrix-js-sdk`,
|
||||
you should check out `matrix-js-sdk`, change into that new directory, and run:
|
||||
|
||||
```bash
|
||||
yarn link
|
||||
```
|
||||
|
||||
Then, switch back to `matrix-react-sdk` and run:
|
||||
Then check out `matrix-react-sdk` and pull in dependencies:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/matrix-org/matrix-react-sdk
|
||||
cd matrix-react-sdk
|
||||
git checkout develop
|
||||
yarn link matrix-js-sdk
|
||||
yarn install
|
||||
```
|
||||
|
||||
See the [help for `yarn link`](https://yarnpkg.com/docs/cli/link) for more
|
||||
|
14
jenkins.sh
14
jenkins.sh
@ -8,14 +8,18 @@ nvm use 10
|
||||
|
||||
set -x
|
||||
|
||||
scripts/fetchdep.sh matrix-org matrix-js-sdk
|
||||
|
||||
pushd matrix-js-sdk
|
||||
yarn link
|
||||
yarn install
|
||||
popd
|
||||
|
||||
yarn link matrix-js-sdk
|
||||
|
||||
# install the other dependencies
|
||||
yarn install
|
||||
|
||||
scripts/fetchdep.sh matrix-org matrix-js-sdk
|
||||
rm -r node_modules/matrix-js-sdk || true
|
||||
ln -s ../matrix-js-sdk node_modules/matrix-js-sdk
|
||||
(cd matrix-js-sdk && yarn install)
|
||||
|
||||
# run the mocha tests
|
||||
yarn test --no-colors
|
||||
|
||||
|
@ -9,19 +9,17 @@ set -ev
|
||||
RIOT_WEB_DIR=riot-web
|
||||
REACT_SDK_DIR=`pwd`
|
||||
|
||||
yarn link
|
||||
|
||||
scripts/fetchdep.sh vector-im riot-web
|
||||
|
||||
pushd "$RIOT_WEB_DIR"
|
||||
|
||||
mkdir node_modules
|
||||
yarn link matrix-js-sdk
|
||||
yarn link matrix-react-sdk
|
||||
|
||||
yarn install
|
||||
|
||||
# use the version of js-sdk we just used in the react-sdk tests
|
||||
rm -r node_modules/matrix-js-sdk
|
||||
ln -s "$REACT_SDK_DIR/node_modules/matrix-js-sdk" node_modules/matrix-js-sdk
|
||||
|
||||
# ... and, of course, the version of react-sdk we just built
|
||||
rm -r node_modules/matrix-react-sdk
|
||||
ln -s "$REACT_SDK_DIR" node_modules/matrix-react-sdk
|
||||
|
||||
yarn build
|
||||
|
||||
popd
|
||||
|
@ -1,11 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
yarn install
|
||||
scripts/fetchdep.sh matrix-org matrix-js-sdk
|
||||
rm -r node_modules/matrix-js-sdk || true
|
||||
ln -s ../matrix-js-sdk node_modules/matrix-js-sdk
|
||||
|
||||
cd matrix-js-sdk
|
||||
scripts/fetchdep.sh matrix-org matrix-js-sdk
|
||||
|
||||
pushd matrix-js-sdk
|
||||
yarn link
|
||||
yarn install
|
||||
popd
|
||||
|
||||
yarn link matrix-js-sdk
|
||||
yarn install
|
||||
cd ..
|
||||
|
Loading…
Reference in New Issue
Block a user