Skip to content

Commit 1ca3de0

Browse files
authored
Merge pull request #23 from solutionDrive/fix-plugin-dev-environment
Fix plugin dev environment
2 parents 06e9635 + 7db009b commit 1ca3de0

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,30 @@ Usage / First steps
3636

3737
First you should start the testing docker containers (see also next section of this README):
3838

39-
vendor/bin/sdTest.sh start
39+
vendor/bin/sdTest.sh start SHOPWARE_VERSION
4040

4141

4242
Handle plugin
4343
-------------
4444

45-
For all following commands you must pass a php version, e.g. 71 for PHP 7.1 container:
45+
For all following commands you must pass a php and shopware version,
46+
e.g. 71 for PHP 7.1 container and 54 for Shopware 5.4 :
4647

4748
For adding the plugin run:
4849

49-
vendor/bin/sdPlugin.sh 71 add
50+
vendor/bin/sdPlugin.sh 71 54 add
5051

5152
For removing the plugin run:
5253

53-
vendor/bin/sdPlugin.sh 71 remove
54+
vendor/bin/sdPlugin.sh 71 54 remove
5455

5556
For activating the plugin run:
5657

57-
vendor/bin/sdPlugin.sh 71 activate
58+
vendor/bin/sdPlugin.sh 71 54 activate
5859

5960
For deactivating the plugin run:
6061

61-
vendor/bin/sdPlugin.sh 71 deactivate
62+
vendor/bin/sdPlugin.sh 71 54 deactivate
6263

6364

6465
Controlling the testing environment
@@ -91,18 +92,18 @@ To restart your containers without loosing data you can run:
9192

9293
Can can also run the containers in foreground to monitor the log output of the containers:
9394

94-
vendor/bin/sdTest.sh run
95+
vendor/bin/sdTest.sh run SHOPWARE_VERSION
9596

9697
Then you can stop the execution by pressing CTRL+C. The containers will exit cleanly.
9798

9899

99100
If you started the container in background using ```start```, you can view the logs by running:
100101

101-
vendor/bin/sdTest.sh logs
102+
vendor/bin/sdTest.sh logs SHOPWARE_VERSION
102103

103104
You can follow the logs (as known from ```tail -f``` or ```tailf```):
104105

105-
vendor/bin/sdTest.sh logs -f
106+
vendor/bin/sdTest.sh logs SHOPWARE_VERSION -f
106107

107108
To connect to the mysql server use ```127.0.0.1``` as host with port (default: 10331) configured in ```etc/test/docker-compose.yml```.
108109

@@ -120,11 +121,11 @@ To be sure that you have the latest version of the (base) containers you can for
120121

121122
To be sure to use the newest containers (not only build based containers):
122123

123-
vendor/bin/sdTest.sh pull
124+
vendor/bin/sdTest.sh pull SHOPWARE_VERSION
124125

125126
To destroy and restart your containers in one step without rebuilding images run:
126127

127-
vendor/bin/sdTest.sh reset
128+
vendor/bin/sdTest.sh reset SHOPWARE_VERSION
128129

129130
Executing a command in the testing environment
130131
----------------------------------------------

bin/sdTest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export PROJECT_NAME="$( basename ${PROJECT_DIR} | tr '[:upper:]' '[:lower:]' )"
4545
export DOCKER_COMPOSE_YAML=${PROJECT_DIR}"/etc/test/docker-compose${SHOPWARE_VERSION}.yml"
4646

4747
if [ "$1" != "init" ]; then
48-
source ${PACKAGE_DIR}/etc/scripts/checkSdTestEnvironment.sh
48+
source ${PACKAGE_DIR}/etc/scripts/checkSdTestEnvironment.sh ${SHOPWARE_VERSION}
4949
fi
5050

5151

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#!/usr/bin/env bash
22

3+
SHOPWARE_VERSION=$1
4+
35
if [ ! -d ${PROJECT_DIR} ]; then
46
echo "Project directory not found in \$PROJECT_DIR. Did you call this script correctly? Cancel."
57
exit 1
68
fi
79

8-
if [ ! -f ${PROJECT_DIR}/etc/test/docker-compose.yml ]; then
9-
echo "No docker-compose.yml file found under ${PROJECT_DIR}/etc/test/docker-compose.yml - Needed for docker setup. Cancel."
10-
echo "Perhaps forgot to run 'vendor/bin/sdTest.sh init'?"
10+
if [ ! -f ${PROJECT_DIR}/etc/test/docker-compose${SHOPWARE_VERSION}.yml ]; then
11+
echo "No docker-compose.yml file found under ${PROJECT_DIR}/etc/test/docker-compose${SHOPWARE_VERSION}.yml - Needed for docker setup. Cancel."
12+
echo "Perhaps forgot to run 'vendor/bin/sdTest.sh init [SHOPWARE_VERSION]'?"
1113
exit 1
1214
fi

0 commit comments

Comments
 (0)