From db9a645d2d438d0d67d6510a7289805576fb1c8e Mon Sep 17 00:00:00 2001 From: Adrien DUPUIS Date: Tue, 14 Apr 2020 14:41:29 +0200 Subject: [PATCH] docker-compose.bash: Fix eZ version switch --- docker-compose.bash | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docker-compose.bash b/docker-compose.bash index 07e935f2..e5382d6d 100755 --- a/docker-compose.bash +++ b/docker-compose.bash @@ -6,7 +6,16 @@ #set -x; # Git: Untracked Files Removal -git clean -df; # Help to switch between eZ Platform v2 and v3 +#git clean -df; + +# Post-Version-Switch Cleaning +EZ_VERSION="$(git describe --tags | cut -d '-' -f 1;)"; +echo "eZ Platform $EZ_VERSION"; +if [[ "$EZ_VERSION" =~ '3.0' ]]; then + rm -rf app/ web/ var/logs/; +elif [[ "$EZ_VERSION" =~ '2.5' ]]; then + rm -rf .env config/ public/ var/log/; +fi; # eZ Platform: Cache and Logs Removal rm -rf var/cache/dev/ var/logs/*.log;