Commit d3f66f6e authored by Pierre SMEYERS's avatar Pierre SMEYERS
Browse files

Merge branch 'fix/8-bluegreen-fails-if-manifest-route-has-a-path' into 'master'

Resolve "bluegreen fails if manifest route has a path"

Closes #8

See merge request to-be-continuous/cloud-foundry!8
parents b198a6ef e2219b8c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -494,9 +494,11 @@ stages:
            route=${route//((appname))/$app_target}
            route=${route//((hostname))/$hostname_target}
            # extract hostname and domain
            route_host=${route%%.*}
            route_domain=${route#*.}
            cf map-route "$app_tmp" "$route_domain" --hostname "$route_host"
            route_host=$(echo "$route" | cut -d '.' -f1)
            route_domain_and_path=$(echo "$route" | cut -d '.' -f2-)
            route_domain=$(echo "$route_domain_and_path" | cut -d '/' -f1)
            route_path=$(echo "$route_domain_and_path" | cut -d '/' -s -f2-)
            cf map-route "$app_tmp" "$route_domain" --hostname "$route_host" ${route_path:+--path "$route_path"}
        done
    else
        # map route from env