Skip to content

Commit 832b05f

Browse files
committed
add possible symfony version to install
1 parent 9f3af65 commit 832b05f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

bin/scripts/check_install.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@
33
usage="$(basename "$0") [-hl] [-t] -- Script to test a bundle installation with on a symfony application.
44
where:
55
-h show help text
6-
-p The complete package name of the bundle;"
6+
-p The complete package name of the bundle
7+
-s The Symfony version to use
8+
-v The version/branch to install;"
79

810
BASE_DIR=${PWD}
911
BUILD_DIR=${BASE_DIR}/build
1012

1113
PACKAGE_NAME=''
1214
VERSION='dev-master'
13-
15+
SYMFONY_VERSION="^3.3"
1416
function installBundle() {
1517
DIR=${BUILD_DIR}/${PACKAGE_NAME}/${VERSION}
16-
18+
if [ "${SYMFONY_VERSION}" = *"dev" ]; then STABILITY_FLAG=' -s dev'; else STABILITY_FLAG=''; fi
1719
mkdir -p ${DIR}
1820
echo "Create directory ${DIR}"
1921
cd ${DIR}
2022
echo "+++ Create Symfony skeleton app +++ "
21-
composer create-project "symfony/skeleton:^3.3" test-app
23+
composer create-project${STABILITY_FLAG} "symfony/skeleton:${SYMFONY_VERSION}" test-app
2224
cd test-app/
2325
composer config extra.symfony.allow-contrib true
2426
if [ "${VERSION}" = "dev"* ]; then perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json; fi
@@ -37,12 +39,13 @@ function installBundle() {
3739
echo "+++ We should fetch composer exit code here +++"
3840
}
3941

40-
while getopts :hv:p: option
42+
while getopts :hv:p:s: option
4143
do
4244
case "${option}"
4345
in
4446
p) PACKAGE_NAME=${OPTARG};;
4547
v) VERSION=${OPTARG};;
48+
s) SYMFONY_VERSION=${OPTARG};;
4649
h) echo "${usage}"
4750
exit 1
4851
;;

0 commit comments

Comments
 (0)