Merge pull request #1825 from mailcow/MAGICCC-patch-1

Don't print 'Collecting garbage...' twice
This commit is contained in:
André Peters 2018-10-03 12:45:48 +02:00 committed by GitHub
commit 38e6de4f6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,6 @@ DATE=$(date +%Y-%m-%d_%H_%M_%S)
BRANCH=$(git rev-parse --abbrev-ref HEAD) BRANCH=$(git rev-parse --abbrev-ref HEAD)
docker_garbage() { docker_garbage() {
echo -e "\e[32mCollecting garbage...\e[0m"
IMGS_TO_DELETE=() IMGS_TO_DELETE=()
for container in $(grep -oP "image: \Kmailcow.+" docker-compose.yml); do for container in $(grep -oP "image: \Kmailcow.+" docker-compose.yml); do
REPOSITORY=${container/:*} REPOSITORY=${container/:*}
@ -74,6 +73,7 @@ while (($#)); do
MERGE_STRATEGY=ours MERGE_STRATEGY=ours
;; ;;
--gc) --gc)
echo -e "\e[32mCollecting garbage...\e[0m"
docker_garbage docker_garbage
exit 0 exit 0
;; ;;