aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-08-11 18:14:50 +0800
committerchriseth <c@ethdev.com>2016-08-11 18:21:20 +0800
commit188a9dcb53e6ea578ec6e6af492cdf0a237f11a1 (patch)
treea4d41773134cfbde59cf83e7dd5ea329cb12fddc
parente2a46b6a705c4312230ea548291c937cf73f7afa (diff)
downloaddexon-solidity-188a9dcb53e6ea578ec6e6af492cdf0a237f11a1.tar
dexon-solidity-188a9dcb53e6ea578ec6e6af492cdf0a237f11a1.tar.gz
dexon-solidity-188a9dcb53e6ea578ec6e6af492cdf0a237f11a1.tar.bz2
dexon-solidity-188a9dcb53e6ea578ec6e6af492cdf0a237f11a1.tar.lz
dexon-solidity-188a9dcb53e6ea578ec6e6af492cdf0a237f11a1.tar.xz
dexon-solidity-188a9dcb53e6ea578ec6e6af492cdf0a237f11a1.tar.zst
dexon-solidity-188a9dcb53e6ea578ec6e6af492cdf0a237f11a1.zip
Fix the publishing script to not publish multiple times per day.
-rwxr-xr-xscripts/travis-emscripten/publish_binary.sh32
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