#!/bin/sh

if [ "$TRAVIS_BRANCH" = "master" ]; then
    TAG="latest"
else
    TAG="$TRAVIS_BRANCH"
fi


cat > docker-test.yaml <<EOF
version: '2'

services:
  mailman-core:
    image: maxking/mailman-core:$TAG

  mailman-web:
    image: maxking/mailman-web:$TAG
EOF

#!/bin/sh

if [ "$TRAVIS_BRANCH" = "master" ]; then
    TAG="latest"
else
    TAG="$TRAVIS_BRANCH"
fi


cat > docker-test.yaml <<EOF
version: '2'

services:
  mailman-core:
    image:maxking/mailman-core:$TAG

  mailman-web:
    image:maxking/mailman-web:$TAG
EOF

--- 
+++ 
@@ -12,8 +12,8 @@
 
 services:
   mailman-core:
-    image: maxking/mailman-core:$TAG
+    image:maxking/mailman-core:$TAG
 
   mailman-web:
-    image: maxking/mailman-web:$TAG
+    image:maxking/mailman-web:$TAG
 EOF
Add space between image and its name.
