-
Notifications
You must be signed in to change notification settings - Fork 1
/
Build.sh
63 lines (50 loc) · 1.27 KB
/
Build.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
#!/bin/sh
export outputDirectory=${PWD}/build
clear
echo
echo Determining build directory structure
echo
if [ ! -d "$outputDirectory" ]; then
echo Creating Directory $outputDirectory
mkdir $outputDirectory
fi
echo -------------------------------------------------------------
echo Output Directory for Build: ${outputDirectory}
echo -------------------------------------------------------------
echo
echo Checking Build Dependencies
echo ..composer.phar
if [ ! -f ${PWD}/composer.phar ]; then
echo Fetching composer.phar
if [ -f ${PWD}/composer.lock ]; then
rm composer.lock
fi
curl -sS https://getcomposer.org/installer | php
else
echo Updating composer.phar inplace
php composer.phar self-update
fi
echo
echo --------------------Building PHP SDK-------------------------
echo
echo Running Composer to make sure all dependencies are installed
php composer.phar install
echo
echo
php buildPhar.php
echo
echo
echo Contents of Build output @: $outputDirectory
ls $outputDirectory
if [[ ":$PATH:" == *":${PWD}/vendor/behat/behat/bin:"* ]]; then
echo Behat already in path skipping
else
echo Registering Behat in the path
export PATH="${PATH}:${PWD}/vendor/behat/behat/bin"
fi
echo
echo
echo To run BDD scenarios
echo php ./vendor/behat/behat/bin/behat
echo or
echo behat