diff options
author | chriseth <chris@ethereum.org> | 2017-12-01 23:25:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-01 23:25:08 +0800 |
commit | 45ddfa1ac46fea1f1f11cf012d80a183ce595a8a (patch) | |
tree | 26291c49fa8bf488d166d22d58ed29417716a89b | |
parent | 6d8d03937ec2d2d43046c502d32111a956f4f375 (diff) | |
parent | f8ef68be1869b2b5a5872839c64d4667aef41c4b (diff) | |
download | dexon-solidity-45ddfa1ac46fea1f1f11cf012d80a183ce595a8a.tar dexon-solidity-45ddfa1ac46fea1f1f11cf012d80a183ce595a8a.tar.gz dexon-solidity-45ddfa1ac46fea1f1f11cf012d80a183ce595a8a.tar.bz2 dexon-solidity-45ddfa1ac46fea1f1f11cf012d80a183ce595a8a.tar.lz dexon-solidity-45ddfa1ac46fea1f1f11cf012d80a183ce595a8a.tar.xz dexon-solidity-45ddfa1ac46fea1f1f11cf012d80a183ce595a8a.tar.zst dexon-solidity-45ddfa1ac46fea1f1f11cf012d80a183ce595a8a.zip |
Merge pull request #3267 from ethereum/docker_manual
Manual deploy to docker.
-rwxr-xr-x | scripts/docker_deploy_manual.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/scripts/docker_deploy_manual.sh b/scripts/docker_deploy_manual.sh new file mode 100755 index 00000000..c098f4ee --- /dev/null +++ b/scripts/docker_deploy_manual.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env sh + +set -e + +if [ -z "$1" ] +then + echo "Usage: $0 <tag/branch>" + exit 1 +fi +branch="$1" + +#docker login + +DIR=$(mktemp -d) +( +cd "$DIR" + +git clone --depth 2 https://github.com/ethereum/solidity.git -b "$branch" +cd solidity +commithash=$(git rev-parse --short=8 HEAD) +echo -n "$commithash" > commit_hash.txt +version=$($(dirname "$0")/get_version.sh) +if [ "$branch" = "release" -o "$branch" = v"$version" ] +then + echo -n > prerelease.txt +else + date -u +"nightly.%Y.%-m.%-d" > prerelease.txt +fi + +rm -rf .git +docker build -t ethereum/solc:build -f scripts/Dockerfile . +tmp_container=$(docker create ethereum/solc:build sh) +if [ "$branch" = "develop" ] +then + docker tag ethereum/solc:build ethereum/solc:nightly; + docker tag ethereum/solc:build ethereum/solc:nightly-"$version"-"$commithash" + docker push ethereum/solc:nightly-"$version"-"$commithash"; + docker push ethereum/solc:nightly; +elif [ "$branch" = v"$version" ] +then + docker tag ethereum/solc:build ethereum/solc:stable; + docker tag ethereum/solc:build ethereum/solc:"$version"; + docker push ethereum/solc:stable; + docker push ethereum/solc:"$version"; +else + echo "Not publishing docker image from branch or tag $branch" +fi +) +rm -rf "$DIR" |