aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-09-09 19:59:22 +0800
committerchriseth <c@ethdev.com>2016-09-09 20:23:33 +0800
commit29ecc6fe31d56feaf5d5a04e84b12138baa0d1e7 (patch)
tree9c3dc9ae8980bb556a3f18cbd290eb6216e90f1f /scripts
parent79867f49b2b27942c465e50475e5e6a0d5a6d897 (diff)
downloaddexon-solidity-29ecc6fe31d56feaf5d5a04e84b12138baa0d1e7.tar
dexon-solidity-29ecc6fe31d56feaf5d5a04e84b12138baa0d1e7.tar.gz
dexon-solidity-29ecc6fe31d56feaf5d5a04e84b12138baa0d1e7.tar.bz2
dexon-solidity-29ecc6fe31d56feaf5d5a04e84b12138baa0d1e7.tar.lz
dexon-solidity-29ecc6fe31d56feaf5d5a04e84b12138baa0d1e7.tar.xz
dexon-solidity-29ecc6fe31d56feaf5d5a04e84b12138baa0d1e7.tar.zst
dexon-solidity-29ecc6fe31d56feaf5d5a04e84b12138baa0d1e7.zip
Remove leading zeroes in prerelease components.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build_emscripten.sh2
-rwxr-xr-xscripts/release_ppa.sh2
-rwxr-xr-xscripts/travis-emscripten/publish_binary.sh5
3 files changed, 6 insertions, 3 deletions
diff --git a/scripts/build_emscripten.sh b/scripts/build_emscripten.sh
index da2c7df3..fe7ea11d 100755
--- a/scripts/build_emscripten.sh
+++ b/scripts/build_emscripten.sh
@@ -29,7 +29,7 @@
set -e
if [[ "$OSTYPE" != "darwin"* ]]; then
- date -u +"nightly.%Y.%m.%d" > prerelease.txt
+ date -u +"nightly.%Y.%-m.%-d" > prerelease.txt
./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 8e9dc282..23c374e1 100755
--- a/scripts/release_ppa.sh
+++ b/scripts/release_ppa.sh
@@ -54,7 +54,7 @@ cd solc
version=`grep -oP "PROJECT_VERSION \"?\K[0-9.]+(?=\")"? CMakeLists.txt`
commithash=`git rev-parse --short HEAD`
committimestamp=`git show --format=%ci HEAD | head -n 1`
-commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10`
+commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10 | sed -e 's/-0?/./' | sed -e 's/-0?/./'`
echo "$commithash" > commit_hash.txt
if [ $branch = develop ]
diff --git a/scripts/travis-emscripten/publish_binary.sh b/scripts/travis-emscripten/publish_binary.sh
index e89e3ce3..bfdf9906 100755
--- a/scripts/travis-emscripten/publish_binary.sh
+++ b/scripts/travis-emscripten/publish_binary.sh
@@ -34,7 +34,10 @@ VER=$(cat CMakeLists.txt | grep 'set(PROJECT_VERSION' | sed -e 's/.*set(PROJECT_
test -n "$VER"
VER="v$VER"
COMMIT=$(git rev-parse --short HEAD)
-DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%Y.%m.%d)
+DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%Y.%-m.%-d)
+
+# remove leading zeros in components - they are not semver-compatible
+COMMIT=$(echo "$COMMIT" | sed -e 's/^0*//')
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"