Skip to content

Commit 22e5e21

Browse files
committed
rev-parse the commit from the deps
Because it's not added to package.json by npm anymore
1 parent 35a671d commit 22e5e21

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎scripts/jenkins.sh‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ npm run lintall -- -f checkstyle -o eslint.xml || true
3434

3535
rm dist/riot-*.tar.gz || true # rm previous artifacts without failing if it doesn't exist
3636

37-
# node_modules deps from 'npm install' don't have a .git dir so can't
38-
# rev-parse; but they do set the commit in package.json under 'gitHead' which
39-
# we're grabbing here.
40-
REACT_SHA=$(grep 'gitHead' node_modules/matrix-react-sdk/package.json | cut -d \" -f 4 | head -c 12)
41-
JSSDK_SHA=$(grep 'gitHead' node_modules/matrix-js-sdk/package.json | cut -d \" -f 4 | head -c 12)
37+
# Since the deps are fetched from git, we can rev-parse
38+
REACT_SHA=$(cd node_modules/matrix-react-sdk; git rev-parse --short=12 HEAD)
39+
JSSDK_SHA=$(cd node_modules/matrix-js-sdk; git rev-parse --short=12 HEAD)
4240

4341
VECTOR_SHA=$(git rev-parse --short=12 HEAD) # use the ACTUAL SHA rather than assume develop
4442

0 commit comments

Comments
 (0)