From 82ba5c9615888af52ed7e537024ad17632b23081 Mon Sep 17 00:00:00 2001 From: chriseth Date: Sat, 17 Sep 2016 18:17:57 +0200 Subject: Fix problem that caused multiple binaries per day. --- scripts/travis-emscripten/publish_binary.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/travis-emscripten/publish_binary.sh') diff --git a/scripts/travis-emscripten/publish_binary.sh b/scripts/travis-emscripten/publish_binary.sh index d372995c..b409ad78 100755 --- a/scripts/travis-emscripten/publish_binary.sh +++ b/scripts/travis-emscripten/publish_binary.sh @@ -55,7 +55,7 @@ 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" +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 -- cgit v1.2.3 From 07538346bd92b83f2f746af51903e158d767dcbe Mon Sep 17 00:00:00 2001 From: chriseth Date: Sat, 17 Sep 2016 18:24:31 +0200 Subject: Also publish from release branch. --- scripts/travis-emscripten/publish_binary.sh | 34 +++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'scripts/travis-emscripten/publish_binary.sh') 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 -- cgit v1.2.3 From a8353b7028f5b6fdd73beb6f81f3ed7bcf1adfe1 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 30 Sep 2016 18:27:18 +0200 Subject: Update publish_binary.sh --- scripts/travis-emscripten/publish_binary.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/travis-emscripten/publish_binary.sh') diff --git a/scripts/travis-emscripten/publish_binary.sh b/scripts/travis-emscripten/publish_binary.sh index 6fce3c6a..6f2d726f 100755 --- a/scripts/travis-emscripten/publish_binary.sh +++ b/scripts/travis-emscripten/publish_binary.sh @@ -86,5 +86,5 @@ node ./update cd bin git add . git add ../soljson.js -git commit -m "Added compiler version $VER" +git commit -m "Added compiler version $FULLVERSION" git push origin gh-pages -- cgit v1.2.3