Skip to content

Commit f7f6104

Browse files
Merge pull request #167 from tchapgouv/update-layered-scripts
chore : update layered scripts
2 parents 1b9834e + bb41358 commit f7f6104

File tree

4 files changed

+29
-10
lines changed

4 files changed

+29
-10
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ electron/pub
2424
.vscode/
2525
.env
2626
/coverage
27+
# yarn links dependencies (generated with /scripts/layered...sh)
28+
/matrix-react-sdk
29+
/matrix-js-sdk
30+
/matrix-analytics-events
31+
32+
2733
# Auto-generated file
2834
/src/modules.ts
2935
/build_config.yaml

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,14 @@ yarn install
331331
yarn start
332332
```
333333

334+
Alternatively, you can skip the above commands and only run the command below. The only difference is that both 'matrix-react-sdk and 'matrix-js-sdk' will be cloned inside the root project folder.
335+
336+
```bash
337+
./scripts/layered.with.version.sh
338+
yarn install
339+
yarn start
340+
```
341+
334342
Wait a few seconds for the initial build to finish; you should see something like:
335343

336344
```

scripts/fetchdep.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ defbranch="$3"
99

1010
[ -z "$defbranch" ] && defbranch="develop"
1111

12-
rm -r "$defrepo" || true
12+
rm -rf "$defrepo" || true
1313

1414
PR_ORG=${PR_ORG:-"matrix-org"}
1515
PR_REPO=${PR_REPO:-"matrix-react-sdk"}

scripts/layered.with.version.sh

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,41 @@ set -x
1616
# Install dependencies, as we'll be using fetchdep.sh from matrix-react-sdk
1717
yarn install --pure-lockfile
1818

19-
# Pass appropriate repo to fetchdep.sh (not needed for tchap-web)
19+
# Pass appropriate repo to fetchdep.sh (:TCHAP: not needed for tchap-web)
2020
#export PR_ORG=vector-im
2121
#export PR_REPO=element-web
2222

23-
#tchap added : grep matrix dependencies version from package.json
23+
# :TCHAP: added : grep matrix dependencies version from package.json
2424
export MATRIX_JS_SDK_VERSION=$(awk -F \" '/"matrix-js-sdk": ".+"/ { print $4; exit; }' package.json)
2525
export MATRIX_REACT_SDK_VERSION=$(awk -F \" '/"matrix-react-sdk": ".+"/ { print $4; exit; }' package.json)
26+
echo "Using MATRIX_JS_SDK_VERSION $MATRIX_JS_SDK_VERSION"
27+
echo "Using MATRIX_REACT_SDK_VERSION $MATRIX_REACT_SDK_VERSION"
2628

2729
# Set up the js-sdk first
2830
./scripts/fetchdep.sh matrix-org matrix-js-sdk v$MATRIX_JS_SDK_VERSION
2931
pushd matrix-js-sdk
32+
yarn unlink # :TCHAP: for local build, undo previous links if present.
3033
yarn link
3134
yarn install --pure-lockfile
3235
popd
3336

37+
# :TCHAP: we don't use this.
3438
# Also set up matrix-analytics-events so we get the latest from
3539
# the main branch or a branch with matching name
36-
./scripts/fetchdep.sh matrix-org matrix-analytics-events main
37-
pushd matrix-analytics-events
38-
yarn link
39-
yarn install --pure-lockfile
40-
yarn build:ts
41-
popd
40+
#./scripts/fetchdep.sh matrix-org matrix-analytics-events main
41+
#pushd matrix-analytics-events
42+
#yarn link
43+
#yarn install --pure-lockfile
44+
#yarn build:ts
45+
#popd
4246

4347
# Now set up the react-sdk
4448
./scripts/fetchdep.sh matrix-org matrix-react-sdk v$MATRIX_REACT_SDK_VERSION
4549
pushd matrix-react-sdk
50+
yarn unlink # :TCHAP: for local build, undo previous links if present.
4651
yarn link
4752
yarn link matrix-js-sdk
48-
yarn link @matrix-org/analytics-events
53+
#yarn link @matrix-org/analytics-events # :TCHAP: we don't use this
4954
yarn install --pure-lockfile
5055
popd
5156

0 commit comments

Comments
 (0)