diff options
author | chriseth <chris@ethereum.org> | 2016-08-11 18:34:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-11 18:34:09 +0800 |
commit | 7c15fa661afd52f9e651e57aced5e75d744b9f62 (patch) | |
tree | a4d41773134cfbde59cf83e7dd5ea329cb12fddc /scripts/travis-emscripten/publish_binary.sh | |
parent | e2a46b6a705c4312230ea548291c937cf73f7afa (diff) | |
parent | 188a9dcb53e6ea578ec6e6af492cdf0a237f11a1 (diff) | |
download | dexon-solidity-7c15fa661afd52f9e651e57aced5e75d744b9f62.tar.gz dexon-solidity-7c15fa661afd52f9e651e57aced5e75d744b9f62.tar.zst dexon-solidity-7c15fa661afd52f9e651e57aced5e75d744b9f62.zip |
Merge pull request #862 from chriseth/fixpublish
Fix the publishing script to not publish multiple times per day.
Diffstat (limited to 'scripts/travis-emscripten/publish_binary.sh')
-rwxr-xr-x | scripts/travis-emscripten/publish_binary.sh | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/scripts/travis-emscripten/publish_binary.sh b/scripts/travis-emscripten/publish_binary.sh index a62d4b47..f44b1210 100755 --- a/scripts/travis-emscripten/publish_binary.sh +++ b/scripts/travis-emscripten/publish_binary.sh @@ -52,19 +52,19 @@ git config user.email "chris@ethereum.org" git checkout -B gh-pages origin/gh-pages git clean -f -d -x # We only want one release per day and we do not want to push the same commit twice. -if ls ./bin/soljson-"$VER-$DATE"-*.js ./bin/soljson-*-"$COMMIT.js" > /dev/null -then - true -else - # This file is assumed to be the product of the build_emscripten.sh script. - cp ../soljson.js ./bin/"soljson-$VER-$DATE-$COMMIT.js" - ./update-index.sh - cd bin - LATEST=$(ls -r soljson-v* | head -n 1) - cp "$LATEST" soljson-latest.js - cp soljson-latest.js ../soljson.js - git add . - git add ../soljson.js - git commit -m "Added compiler version $LATEST" - git push origin gh-pages -fi +for f in ./bin/soljson-"$VER-$DATE"-*.js ./bin/soljson-*-"$COMMIT.js" +do + [ -f "$f" ] && echo "Not publishing, we already published this version today." && exit 0 +done + +# This file is assumed to be the product of the build_emscripten.sh script. +cp ../soljson.js ./bin/"soljson-$VER-$DATE-$COMMIT.js" +./update-index.sh +cd bin +LATEST=$(ls -r soljson-v* | head -n 1) +cp "$LATEST" soljson-latest.js +cp soljson-latest.js ../soljson.js +git add . +git add ../soljson.js +git commit -m "Added compiler version $LATEST" +git push origin gh-pages |