forked from AOEpeople/MageTestStand
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.sh
37 lines (28 loc) · 808 Bytes
/
setup.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
#!/bin/bash
set -e
set -x
function cleanup {
if [ -z $SKIP_CLEANUP ]; then
echo "Removing build directory ${BUILDENV}"
rm -rf "${BUILDENV}"
fi
}
trap cleanup EXIT
# check if this is a travis environment
if [ ! -z $TRAVIS_BUILD_DIR ] ; then
WORKSPACE=$TRAVIS_BUILD_DIR
fi
if [ -z $WORKSPACE ] ; then
echo "No workspace configured, please set your WORKSPACE environment"
exit
fi
BUILDENV=`mktemp -d /tmp/mageteststand.XXXXXXXX`
echo "Using build directory ${BUILDENV}"
git clone https://github.com/CodistoConnect/MageTestStand.git "${BUILDENV}"
cp -rf "${WORKSPACE}" "${BUILDENV}/.modman/"
${BUILDENV}/install.sh
if [ -d "${WORKSPACE}/vendor" ] ; then
cp -rf ${WORKSPACE}/vendor/* "${BUILDENV}/vendor/"
fi
cd ${BUILDENV}/htdocs
${BUILDENV}/bin/phpunit --colors -d display_errors=1