-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·47 lines (39 loc) · 1009 Bytes
/
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
echo "Deleting _site and _serve";
rm -rf _site
export URL=http://localhost:8181
export DOCSSITE_HISTORY_URL=http://localhost:8181/history
export TRAVIS_TAG=0.1.0
echo "Simulating build $TRAVIS_TAG"
cp test/versions-1.json src/_data/versions.json
npm run build
wait
rm -rf serve
cp -R _site serve
echo "\n\n*******************************************\n"
echo "Go start \nhttp-serve serve -p 8181\n in another terminal"
echo "\n*******************************************\n\n"
echo "Press any key to continue\n\n"
while [ true ] ; do
read -t 3 -n 1
if [ $? = 0 ] ; then
break ;
else
echo "waiting for the keypress"
fi
done
export TRAVIS_TAG=0.2.0
echo "Simulating build $TRAVIS_TAG"
cp test/versions-2.json src/_data/versions.json
npm run build
wait
rm -rf serve
cp -R _site serve
export TRAVIS_TAG=0.3.0
echo "Simulating build $TRAVIS_TAG"
cp test/versions-3.json src/_data/versions.json
npm run build
wait
rm -rf serve
cp -R _site serve
# reset to 0.1.0
cp test/versions-1.json src/_data/versions.json