forked from brainsprite/brainsprite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate
executable file
·55 lines (43 loc) · 1.08 KB
/
update
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
#!/usr/bin/bash
while getopts ":ht" opt; do
case ${opt} in
h )
echo "Usage:"
echo " update Update the docs and run all tests."
echo " update -h Display this help message."
echo " update -t Update the docs and the target of all tests."
exit 0
;;
t )
echo "Updating the target of all tests."
export TEST_RUN="init"
;;
\? )
echo "Invalid Option: -$OPTARG" 1>&2
exit 1
;;
esac
done
shift $((OPTIND -1))
CURRPATH=`pwd`
SCRIPT=`realpath -s $0`
SCRIPTPATH=`dirname $SCRIPT`
cd $SCRIPTPATH
echo minifying brainsprite.js
minify brainsprite.js > brainsprite.min.js
echo updating js assets in brainsprite.py
cp brainsprite.min.js brainsprite/data/js/
echo python tests
pytest brainsprite/tests
echo flushing previous docs build
rm -rf $SCRIPTPATH/docs/build
rm -rf $SCRIPTPATH/docs/source/auto_examples
rm -rf $SCRIPTPATH/tests/plot_*.html
echo Building docs
cd docs
make html
echo Running tests and updating tutorial thumbnails
cd ..
npm test
export TEST_RUN="regular"
cd $CURRPATH