diff options
author | chriseth <c@ethdev.com> | 2016-09-18 00:24:31 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-09-18 00:24:31 +0800 |
commit | 07538346bd92b83f2f746af51903e158d767dcbe (patch) | |
tree | 66e71ac46bd817235f3a80a0c7231caafba6d5b0 | |
parent | 82ba5c9615888af52ed7e537024ad17632b23081 (diff) | |
download | dexon-solidity-07538346bd92b83f2f746af51903e158d767dcbe.tar.gz dexon-solidity-07538346bd92b83f2f746af51903e158d767dcbe.tar.zst dexon-solidity-07538346bd92b83f2f746af51903e158d767dcbe.zip |
Also publish from release branch.
-rw-r--r-- | .travis.yml | 4 | ||||
-rwxr-xr-x | scripts/travis-emscripten/publish_binary.sh | 34 |
2 files changed, 28 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml index da9bd2f9..33693eca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -186,7 +186,9 @@ deploy: script: test $TRAVIS_EMSCRIPTEN != On || scripts/release_emscripten.sh skip_cleanup: true on: - branch: develop + branch: + - develop + - release # This is the deploy target for the native build (Linux and macOS) # which generates ZIPs per commit. We are in agreement that diff --git a/scripts/travis-emscripten/publish_binary.sh b/scripts/travis-emscripten/publish_binary.sh index b409ad78..6fce3c6a 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 $VER" git push origin gh-pages |