-
Notifications
You must be signed in to change notification settings - Fork 1
/
Build.bat
59 lines (49 loc) · 1.35 KB
/
Build.bat
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
@echo off
set outputDirectory=%~dp0%build\
set currentDirectory=%~dp0%
cls
echo(
echo Determining build directory structure
echo(
IF NOT EXIST %outputDirectory% (
echo Creating Directory %outputDirectory%
mkdir %outputDirectory%
)
echo -------------------------------------------------------------
echo Output Directory for Build: %outputDirectory%
echo -------------------------------------------------------------
echo(
echo Checking Build Dependencies
echo ..composer.phar
IF NOT EXIST %currentDirectory%composer.phar (
echo Fetching composer.phar
IF EXIST %currentDirectory%composer.lock (del composer.lock)
curl -sS https://getcomposer.org/installer | php
) else (
echo Updating composer.phar inplace
php composer.phar self-update
)
echo(
echo --------------------Building PHP SDK-------------------------
echo(
echo Running Composer to make sure all dependencies are installed
rem php composer.phar install
echo(
echo(
rem php buildPhar.php
echo(
echo(
echo Contents of Build output @: %outputDirectory%
dir /B %outputDirectory%
echo ;%PATH%; | find /C /I ";%currentDirectory%vendor/behat/behat/bin;" > nul
IF %ERRORLEVEL% == 1 (
echo Behat not found adding to the path
set PATH="%PATH%;%currentDirectory%vendor/behat/behat/bin"
) else (
echo BEHAT found
)
echo(
echo To run BDD scenarios
echo php ./vendor/behat/behat/bin/behat
echo or
echo behat