forked from compat-table/compat-table
-
Notifications
You must be signed in to change notification settings - Fork 33
/
test.sh
60 lines (45 loc) · 1.72 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
. $NVM_DIR/nvm.sh
mkdir -p ./results
curl https://raw.githubusercontent.com/kangax/compat-table/gh-pages/data-es6.js > data-es6.js
curl https://raw.githubusercontent.com/kangax/compat-table/gh-pages/data-es2016plus.js > data-es2016plus.js
curl https://raw.githubusercontent.com/kangax/compat-table/gh-pages/data-esnext.js > data-esnext.js
echo
echo 'extracting testers...'
node extract.js ./data-es6.js > ./testers-es6.json
node extract.js ./data-es2016plus.js > ./testers-es2016plus.json
node extract.js ./data-esnext.js > ./testers-esnext.json
node testers.js > testers.json
echo
echo 'running the tests on each version of node...'
bash versions.sh > v8.versions
xargs -P $(nproc) -n 1 ./test-one.sh < v8.versions
LATEST=$(curl -sL https://nodejs.org/download/nightly/index.tab | awk '{ if (!f && NR > 1) { print $1; f = 1 } }')
echo Testing nightly $LATEST
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly ./test-one.sh $LATEST
# test latest from the v8 team
#bash download-chromium-latest.sh
#if [ -d "./chromium-latest" ]; then
# chromium-latest/bin/node test.js
#fi
# chakracore stopped publishing NON-windows versions :(
#LATEST=$(curl -sL https://nodejs.org/download/chakracore-nightly/index.tab | awk '{ if (!f && NR > 1) { print $1; f = 1 } }')
#PROJECT_NAME="node" PROJECT_URL="https://nodejs.org/download/chakracore-nightly/" n project $LATEST
#node test.js
nvm install 10.16.3
git add ./results/**/*.json
git add v8.versions
if [[ `git status -s` == '' ]]; then
echo 'No changes';
exit 0;
fi
echo
echo 'building webpage...'
node build.js
node build-nightly.js
echo
echo 'saving the results...'
git config user.email "[email protected]"
git config user.name "Imma Bot"
git commit -am 'Auto Update'
git push