diff options
author | chriseth <chris@ethereum.org> | 2016-10-04 18:00:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-04 18:00:40 +0800 |
commit | c63b2452e50e0c763a1bb09c7472a7411a20b0e7 (patch) | |
tree | 29fd3a2f3a858ecaf70bb97ab17c9dc41dc99e10 /scripts/travis-emscripten/publish_binary.sh | |
parent | d5cfb17b32147e950a689a507e0d5487dece7e8a (diff) | |
parent | a8353b7028f5b6fdd73beb6f81f3ed7bcf1adfe1 (diff) | |
download | dexon-solidity-c63b2452e50e0c763a1bb09c7472a7411a20b0e7.tar dexon-solidity-c63b2452e50e0c763a1bb09c7472a7411a20b0e7.tar.gz dexon-solidity-c63b2452e50e0c763a1bb09c7472a7411a20b0e7.tar.bz2 dexon-solidity-c63b2452e50e0c763a1bb09c7472a7411a20b0e7.tar.lz dexon-solidity-c63b2452e50e0c763a1bb09c7472a7411a20b0e7.tar.xz dexon-solidity-c63b2452e50e0c763a1bb09c7472a7411a20b0e7.tar.zst dexon-solidity-c63b2452e50e0c763a1bb09c7472a7411a20b0e7.zip |
Merge pull request #1109 from ethereum/fixmultipublish
Fix multiple binaries and publish from release branch
Diffstat (limited to 'scripts/travis-emscripten/publish_binary.sh')
-rwxr-xr-x | scripts/travis-emscripten/publish_binary.sh | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/scripts/travis-emscripten/publish_binary.sh b/scripts/travis-emscripten/publish_binary.sh index d372995c..6f2d726f 100755 --- a/scripts/travis-emscripten/publish_binary.sh +++ b/scripts/travis-emscripten/publish_binary.sh @@ -54,21 +54,37 @@ git config user.name "travis" 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-nightly.$DATE"-*.js || ls ./bin/soljson-*"commit.$COMMIT.js" + + +FULLVERSION=INVALID +if [ "$TRAVIS_BRANCH" = release ] then - echo "Not publishing, we already published this version today." - exit 0 + # We only want one file with this version + if ls ./bin/soljson-"$VER+"*.js + then + echo "Not publishing, we already published this version." + exit 0 + fi + FULLVERSION="$VER+commit.$COMMIT" +elif [ "$TRAVIS_BRANCH" = develop ] + # We only want one release per day and we do not want to push the same commit twice. + if ls ./bin/soljson-"$VER-nightly.$DATE"*.js || ls ./bin/soljson-*"commit.$COMMIT.js" + then + echo "Not publishing, we already published this version today." + exit 0 + fi + FULLVERSION="$VER-nightly.$DATE+commit.$COMMIT" +else + echo "Not publishing, wrong branch." + exit 0 fi + # This file is assumed to be the product of the build_emscripten.sh script. -cp ../soljson.js ./bin/"soljson-$VER-nightly.$DATE+commit.$COMMIT.js" +cp ../soljson.js ./bin/"soljson-$FULLVERSION.js" node ./update 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 commit -m "Added compiler version $FULLVERSION" git push origin gh-pages |