#! /bin/bash -eu

# Git-push to ...$CENTRALREPO

# This can be run manually inside the (git) source tree.
: ${GBP_TAG=$(git describe --tags)}
: ${GBP_BRANCH=$(git branch --show-current)}


possibly_push_into()
{
    remote=$1
    if git remote get-url $remote; then
        git push $remote $GBP_TAG || echo "'git push' failed for the tag $GBP_TAG"
        git push $remote $GBP_BRANCH || echo "'git push' failed for the branch $GBP_BRANCH"
    fi
}


possibly_push_into "maruska"
possibly_push_into "origin"
possibly_push_into "github"

#GBP_SHA1
