2017-02-03 00:53:30 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2017-02-13 10:22:07 +00:00
|
|
|
set -e
|
|
|
|
|
2018-11-27 20:45:59 +00:00
|
|
|
image="ethereum/solc"
|
|
|
|
|
|
|
|
tag_and_push()
|
|
|
|
{
|
|
|
|
docker tag "$image:$1" "$image:$2"
|
|
|
|
docker push "$image:$2"
|
|
|
|
}
|
|
|
|
|
2017-02-03 00:53:30 +00:00
|
|
|
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
|
2017-06-30 10:30:57 +00:00
|
|
|
version=$($(dirname "$0")/get_version.sh)
|
2017-02-13 11:28:39 +00:00
|
|
|
if [ "$TRAVIS_BRANCH" = "develop" ]
|
|
|
|
then
|
2018-11-27 20:45:59 +00:00
|
|
|
tag_and_push build nightly
|
|
|
|
tag_and_push build nightly-"$version"-"$TRAVIS_COMMIT"
|
|
|
|
tag_and_push build-alpine nightly-alpine
|
|
|
|
tag_and_push build-alpine nightly-alpine-"$version"-"$TRAVIS_COMMIT"
|
2017-02-13 11:28:39 +00:00
|
|
|
elif [ "$TRAVIS_TAG" = v"$version" ]
|
|
|
|
then
|
2018-11-27 20:45:59 +00:00
|
|
|
tag_and_push build stable
|
|
|
|
tag_and_push build "$version"
|
|
|
|
tag_and_push build-alpine stable-alpine
|
|
|
|
tag_and_push build-alpine "$version"-alpine
|
2017-02-13 11:28:39 +00:00
|
|
|
else
|
|
|
|
echo "Not publishing docker image from branch $TRAVIS_BRANCH or tag $TRAVIS_TAG"
|
2017-02-10 13:07:46 +00:00
|
|
|
fi
|