2017-02-03 00:53:30 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
2017-02-13 10:22:07 +00:00
|
|
|
set -e
|
|
|
|
|
2017-02-03 00:53:30 +00:00
|
|
|
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
|
2017-02-09 17:36:08 +00:00
|
|
|
version=$(grep -oP "PROJECT_VERSION \"?\K[0-9.]+(?=\")"? $(dirname "$0")/../CMakeLists.txt)
|
2017-02-13 11:28:39 +00:00
|
|
|
if [ "$TRAVIS_BRANCH" = "develop" ]
|
|
|
|
then
|
|
|
|
docker tag ethereum/solc:build ethereum/solc:nightly;
|
|
|
|
docker tag ethereum/solc:build ethereum/solc:nightly-"$version"-"$TRAVIS_COMMIT"
|
|
|
|
docker push ethereum/solc:nightly-"$version"-"$TRAVIS_COMMIT";
|
|
|
|
docker push ethereum/solc:nightly;
|
|
|
|
elif [ "$TRAVIS_TAG" = v"$version" ]
|
|
|
|
then
|
2017-03-16 17:13:34 +00:00
|
|
|
docker tag ethereum/solc:build ethereum/solc:stable;
|
2017-02-13 11:28:39 +00:00
|
|
|
docker tag ethereum/solc:build ethereum/solc:"$version";
|
2017-03-16 17:13:34 +00:00
|
|
|
docker push ethereum/solc:stable;
|
2017-02-13 11:28:39 +00:00
|
|
|
docker push ethereum/solc:"$version";
|
|
|
|
else
|
|
|
|
echo "Not publishing docker image from branch $TRAVIS_BRANCH or tag $TRAVIS_TAG"
|
2017-02-10 13:07:46 +00:00
|
|
|
fi
|