#!/usr/bin/env bash

format="%10s\t%s\t%s\n"

version () {
    environ=$1
    svc=$2
    echo "$(curl -s https://${svc}-${environ}-marvel2.zooxlabs.com/varz | jq -r .version)"
}

show_version () {
    svc=$1
    printf ${format} ${svc} "$(version dev ${svc})" "$(version test ${svc})"
}

printf ${format} Service Dev Test
printf ${format} "~~~~~~~" "~~~~~~~" "~~~~~~~"

show_version restapi
show_version jobz
