Skip to content

Commit 025a026

Browse files
committed
Use js-sdk and react-sdk from jenkins artifacts
1 parent acb4435 commit 025a026

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

jenkins.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1-
#!/bin/bash -l
1+
#!/bin/bash
2+
3+
set -e
4+
25
export NVM_DIR="/home/jenkins/.nvm"
36
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
47
nvm use 4
8+
9+
set -x
10+
11+
# install the versions of js-sdk and react-sdk provided to us by jenkins
12+
npm install ./node_modules/matrix-js-sdk-*.tgz
13+
npm install ./node_modules/matrix-react-sdk-*.tgz
14+
15+
# install the other dependencies
516
npm install
6-
(cd node_modules/matrix-react-sdk && npm run build) # npm doesn't do this when dependencies point at github.com >:(
7-
npm run build # Dumps artificats to /vector
17+
18+
# build our artifacts; dumps them in ./vector
19+
npm run build
820

921
# gzip up ./vector
1022
rm vector-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist
11-
REACT_SHA=$(grep 'gitHead' node_modules/matrix-react-sdk/package.json | cut -d \" -f 4 | head -c 12) # node_modules deps from 'npm install' don't have a .git dir so can't rev-parse.
12-
JSSDK_SHA=$(grep 'gitHead' node_modules/matrix-js-sdk/package.json | cut -d \" -f 4 | head -c 12) # But they do set the commit in package.json under 'gitHead' which we're grabbing here.
23+
24+
REACT_SHA=$(head -c 12 node_modules/matrix-react-sdk/version.txt)
25+
JSSDK_SHA=$(head -c 12 node_modules/matrix-js-sdk/version.txt)
1326
VECTOR_SHA=$(git rev-parse --short=12 HEAD) # use the ACTUAL SHA rather than assume develop
1427
tar -zcvhf vector-$VECTOR_SHA-react-$REACT_SHA-js-$JSSDK_SHA.tar.gz vector #g[z]ip, [c]reate archive, [v]erbose, [f]ilename, [h]ard-dereference (do not archive symlinks)

0 commit comments

Comments
 (0)