forked from foundation/foundation-sites
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests.sh
executable file
·83 lines (78 loc) · 2.27 KB
/
run-tests.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#! /bin/sh
grunt travis
rc=$?
if [ "$rc" -ne 0 ] ; then
exit $rc
fi
# test compass install
FOUNDATION_COMPASS_TEMPLATE=foundation-compass-template
FOUNDATION_LIBSASS_TEMPLATE=foundation-libsass-template
mkdir test
cd test
if [ -d "${FOUNDATION_COMPASS_TEMPLATE}" ]; then
rm -rf $FOUNDATION_COMPASS_TEMPLATE
fi
git clone git://github.com/zurb/${FOUNDATION_COMPASS_TEMPLATE}.git
cd $FOUNDATION_COMPASS_TEMPLATE
bower install ../../dist/assets --save
cp -f bower_components/foundation/scss/foundation/_settings.scss scss/_settings.scss
bundle exec compass compile
rc=$?
if [ "$rc" -ne 0 ] ; then
echo "[FAILURE] Compass Build"
exit $rc
fi
rm stylesheets/app.css
sed -e 's/^\/\/ @/@/' -e 's/^\/\/ \$/\$/' scss/_settings.scss > scss/_settings.scss
bundle exec compass compile
rc=$?
if [ "$rc" -ne 0 ] ; then
echo "[FAILURE] Compass Build w/_settings.scss"
exit $rc
fi
rm stylesheets/app.css
echo "[SUCCESS] Compass Build"
# test sass-only install
cp -f bower_components/foundation/scss/foundation/_settings.scss scss/_settings.scss
bundle exec sass --load-path bower_components/foundation/scss scss/app.scss:stylesheets/app.css
rc=$?
if [ "$rc" -ne 0 ] ; then
echo "[FAILURE] Ruby Sass Build"
exit $rc
fi
rm stylesheets/app.css
sed -e 's/^\/\/ @/@/' -e 's/^\/\/ \$/\$/' scss/_settings.scss > scss/_settings.scss
bundle exec sass --load-path bower_components/foundation/scss scss/app.scss:stylesheets/app.css
rc=$?
if [ "$rc" -ne 0 ] ; then
echo "[FAILURE] Ruby Sass Build w/_settings.scss"
exit $rc
fi
rm stylesheets/app.css
echo "[SUCCESS] Ruby Sass Build"
# test libsass install
cd ..
if [ -d "${FOUNDATION_LIBSASS_TEMPLATE}" ]; then
rm -rf $FOUNDATION_LIBSASS_TEMPLATE
fi
git clone git://github.com/zurb/${FOUNDATION_LIBSASS_TEMPLATE}.git
cd $FOUNDATION_LIBSASS_TEMPLATE
npm install
bower install ../../dist/assets --save
cp -f bower_components/foundation/scss/foundation/_settings.scss scss/_settings.scss
grunt sass:dist
rc=$?
if [ "$rc" -ne 0 ] ; then
echo "[FAILURE] Node Libsass Build"
exit $rc
fi
rm css/app.css
sed -e 's/^\/\/ @/@/' -e 's/^\/\/ \$/\$/' scss/_settings.scss > scss/_settings.scss
grunt sass:dist
rc=$?
if [ "$rc" -ne 0 ] ; then
echo "[FAILURE] Node Libsass Build w/_settings.scss"
exit $rc
fi
rm css/app.css
echo "[SUCCESS] Node Libsass Build"