aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_emscripten.sh7
-rwxr-xr-xscripts/release_ppa.sh2
-rwxr-xr-xscripts/travis-emscripten/publish_binary.sh34
3 files changed, 32 insertions, 11 deletions
diff --git a/scripts/build_emscripten.sh b/scripts/build_emscripten.sh
index fe7ea11d..9b432e95 100755
--- a/scripts/build_emscripten.sh
+++ b/scripts/build_emscripten.sh
@@ -29,7 +29,12 @@
set -e
if [[ "$OSTYPE" != "darwin"* ]]; then
- date -u +"nightly.%Y.%-m.%-d" > prerelease.txt
+ if [ "$TRAVIS_BRANCH" = release ]
+ then
+ echo -n > prerelease.txt
+ else
+ date -u +"nightly.%Y.%-m.%-d" > prerelease.txt
+ fi
./scripts/travis-emscripten/install_deps.sh
docker run -v $(pwd):/src trzeci/emscripten:sdk-tag-1.35.4-64bit ./scripts/travis-emscripten/build_emscripten.sh
fi
diff --git a/scripts/release_ppa.sh b/scripts/release_ppa.sh
index 6a30faf5..7231f582 100755
--- a/scripts/release_ppa.sh
+++ b/scripts/release_ppa.sh
@@ -59,7 +59,7 @@ commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10 | sed -e 's/-0
echo "$commithash" > commit_hash.txt
if [ $branch = develop ]
then
- debversion="$version-nightly-$commitdate-$commithash"
+ debversion="$version-develop-$commitdate-$commithash"
else
debversion="$version"
echo -n > prerelease.txt # proper release
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