Current section

Files

Jump to
devtools scripts docker-push
Raw

scripts/docker-push

#!/usr/bin/env sh
app=$1
tag="$2"
if [ "$tag" != "" ]; then
docker push "$app:latest"
docker push "$app:$tag"
else
branch=$(git rev-parse --abbrev-ref HEAD | cut -f2 -d"/")
branch=${branch:-master}
docker push "$app:$branch"
fi