mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-02-06 10:39:21 +03:00
Created environment setup wrapper script
This script makes setting up the environment for testing easier. It detects that it's on travis and creates the appropriate setup right there, or on personal machines uses vagrant. If vagrant is running is skips the full setup and simply resets the mailbox for fast testing.
This commit is contained in:
parent
bcf57ce903
commit
6e6d66ed87
27
tests/SetupEnvironment.sh
Executable file
27
tests/SetupEnvironment.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
if [ -n "$TRAVIS" ]; then
|
||||||
|
|
||||||
|
echo 'Travis config not yet written'
|
||||||
|
cp -Rp $DIR/resources /resources
|
||||||
|
/bin/bash /resources/Scripts/Provision.sh
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
# Since not in travis, lets load up a system with vagrant
|
||||||
|
|
||||||
|
cd $DIR/vagrant
|
||||||
|
|
||||||
|
VAGRANTSTATUS=$(vagrant status)
|
||||||
|
|
||||||
|
# If vagrant is running already, reprovision it so it has fresh email boxes.
|
||||||
|
if echo "$VAGRANTSTATUS" | egrep -q "running" ; then
|
||||||
|
vagrant provision
|
||||||
|
else
|
||||||
|
vagrant up --provision
|
||||||
|
fi
|
||||||
|
cd $DIR
|
||||||
|
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user