File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,19 @@ export MOODLE_DOCKER_DB=pgsql
1515
1616initcmd=" bin/moodle-docker-compose exec -T webserver php ${MOODLE_BEHAT_CLI_ROOT} /init.php"
1717
18+ if [ -d " $basedir /moodle/public" ];
19+ then
20+ MOODLE_PUBLIC_ROOT=" $basedir /moodle/public"
21+ else
22+ MOODLE_PUBLIC_ROOT=" $basedir /moodle"
23+ fi
24+
1825if [ " $SUITE " = " app-development" ];
1926then
2027 export MOODLE_DOCKER_APP_PATH=" ${basedir} /app"
2128
2229 git clone --branch " $MOODLE_DOCKER_APP_VERSION " --depth 1 https://github.com/moodlehq/moodleapp $basedir /app
23- git clone --branch " $MOODLE_DOCKER_APP_VERSION " --depth 1 https://github.com/moodlehq/moodle-local_moodleappbehat $basedir /moodle /local/moodleappbehat
30+ git clone --branch " $MOODLE_DOCKER_APP_VERSION " --depth 1 https://github.com/moodlehq/moodle-local_moodleappbehat ${MOODLE_PUBLIC_ROOT} /local/moodleappbehat
2431
2532 if [[ ! -f $basedir /app/.npmrc || -z " $( cat $basedir /app/.npmrc | grep unsafe-perm) " ]];
2633 then
4350 branch=" v$branch "
4451 fi
4552
46- git clone --branch " $branch " --depth 1 https://github.com/moodlehq/moodle-local_moodleappbehat $basedir /moodle/local/moodleappbehat
53+ git clone --branch " $branch " --depth 1 https://github.com/moodlehq/moodle-local_moodleappbehat ${MOODLE_PUBLIC_ROOT} /local/moodleappbehat
54+
4755else
4856 echo " Error, unknown suite '$SUITE '"
4957 exit 1
5058fi
5159
52- cp $basedir /assets/appbehattests/app.feature $basedir /moodle /local/moodleappbehat/tests/behat/app.feature
60+ cp $basedir /assets/appbehattests/app.feature ${MOODLE_PUBLIC_ROOT} /local/moodleappbehat/tests/behat/app.feature
5361
5462echo " Pulling docker images"
5563$basedir /bin/moodle-docker-compose pull
Original file line number Diff line number Diff line change @@ -4,7 +4,14 @@ basedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
44
55export MOODLE_DOCKER_WWWROOT=" ${basedir} /moodle"
66
7- rm -f $basedir /moodle/local/moodleappbehat/tests/behat/app.feature
7+ if [ -d " $MOODLE_DOCKER_WWWROOT /public" ];
8+ then
9+ MOODLE_PUBLIC_ROOT=" $MOODLE_DOCKER_WWWROOT /public"
10+ else
11+ MOODLE_PUBLIC_ROOT=" $MOODLE_DOCKER_WWWROOT "
12+ fi
13+
14+ rm -f ${MOODLE_PUBLIC_ROOT} /local/moodleappbehat/tests/behat/app.feature
815
916if [ " $SUITE " = " phpunit" ];
1017then
You can’t perform that action at this time.
0 commit comments