File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 3
3
usage=" $( basename " $0 " ) [-hl] [-t] -- Script to test a bundle installation with on a symfony application.
4
4
where:
5
5
-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;"
7
9
8
10
BASE_DIR=${PWD}
9
11
BUILD_DIR=${BASE_DIR} /build
10
12
11
13
PACKAGE_NAME=' '
12
14
VERSION=' dev-master'
13
-
15
+ SYMFONY_VERSION= " ^3.3 "
14
16
function installBundle() {
15
17
DIR=${BUILD_DIR} /${PACKAGE_NAME} /${VERSION}
16
-
18
+ if [ " ${SYMFONY_VERSION} " = * " dev " ] ; then STABILITY_FLAG= ' -s dev ' ; else STABILITY_FLAG= ' ' ; fi
17
19
mkdir -p ${DIR}
18
20
echo " Create directory ${DIR} "
19
21
cd ${DIR}
20
22
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
22
24
cd test-app/
23
25
composer config extra.symfony.allow-contrib true
24
26
if [ " ${VERSION} " = " dev" * ]; then perl -pi -e ' s/^}$/,"minimum-stability":"dev"}/' composer.json; fi
@@ -37,12 +39,13 @@ function installBundle() {
37
39
echo " +++ We should fetch composer exit code here +++"
38
40
}
39
41
40
- while getopts :hv:p: option
42
+ while getopts :hv:p:s: option
41
43
do
42
44
case " ${option} "
43
45
in
44
46
p) PACKAGE_NAME=${OPTARG} ;;
45
47
v) VERSION=${OPTARG} ;;
48
+ s) SYMFONY_VERSION=${OPTARG} ;;
46
49
h) echo " ${usage} "
47
50
exit 1
48
51
;;
You can’t perform that action at this time.
0 commit comments