-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup
executable file
·55 lines (46 loc) · 1.23 KB
/
setup
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
#!/bin/bash
bower install
npm install
gulp build
gulp config --env local
cordova plugin add com.ionic.keyboard # not 100% why this isn't installed properly otherwise
# E2E
node_modules/.bin/webdriver-manager update
node_modules/.bin/webdriver-manager update --standalone
cp $(find . -name selenium-server-standalone*) protractor/selenium-server-standalone.jar
cp $(find . -name chromedriver) protractor/chromedriver
# Run tests
echo "Running unit tests..."
gulp test
echo ""
echo ""
if [ $? != 0 ]; then
echo "Unit tests did not pass. Please check everything is in order."
else
echo "Unit tests passed."
fi
echo ""
echo "Setting up git hooks..."
mkdir -p .git/hooks
rm .git/hooks/*;
echo '#!/bin/bash
gulp test;' > .git/hooks/pre-commit;
chmod +x .git/hooks/pre-commit;
echo "done."
#echo "Running e2e tests..."
#gulp e2e
#
#if [ $? != 0 ]; then
# echo "E2E Tests did not pass. Please check everything is in order."
#else
# echo "E2E tests passed."
#fi
#echo "Running e2e-cordova tests..."
#gulp e2e-cordova
#if [ $? != 0 ]; then
# echo "E2E Tests with cordova did not pass. Please check everything is in order."
#else
# echo "E2E tests with cordova passed."
#fi
echo "Setup completed"
echo "Run ionic-serve to start the server"