forked from FordLabs/retroquest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare.sh
executable file
·64 lines (52 loc) · 1.52 KB
/
prepare.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
60
61
62
63
64
#!/bin/bash
echo "
| | |
)_) )_) )_)
)___))___))___)\\
)____)____)_____)\\\\
_____|____|____|____\\\\\\__
---------\ S.S. Market Speed /---------
^^^^^ ^^^^^^^^^^^^^^^^^^^^^
^^^^ ^^^^ ^^^ ^^
^^^^ ^^^"
set -e
if [[ $(git diff .) ]]
then
echo "You have unstaged changes. Aborting..."
exit 1
fi
set -x
### Test UI Unit Tests ###
pushd ui
npm install
npm run lint-fix
npm run sass-lint-fix
set +x
if [[ $(git diff .) ]]
then
git add -A
git commit --amend --no-edit
echo "Amended lint fixes to last commit"
fi
set -x
npm run build
if npm run unit | grep -E "ERROR|FAILED"
then
exit 1
fi
popd
### Test API ###
pushd api
SPRING_PROFILES_ACTIVE=docker ./gradlew clean build test dockerApiTest
popd
set +x
echo '
/$$$$$$
/$$__ $$
| $$ \__/ /$$ /$$ /$$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$$
| $$$$$$ | $$ | $$ /$$_____/ /$$_____/ /$$__ $$ /$$_____//$$_____/
\____ $$| $$ | $$| $$ | $$ | $$$$$$$$| $$$$$$| $$$$$$
/$$ \ $$| $$ | $$| $$ | $$ | $$_____/ \____ $$\____ $$
| $$$$$$/| $$$$$$/| $$$$$$$| $$$$$$$| $$$$$$$ /$$$$$$$//$$$$$$$/
\______/ \______/ \_______/ \_______/ \_______/|_______/|_______/
'