Skip to content

Commit 29ecc6f

Browse files
committed
Remove leading zeroes in prerelease components.
1 parent 79867f4 commit 29ecc6f

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.commit_hash.txt
2+
.prerelease.txt
3+
14
# Compiled Object files
25
*.slo
36
*.lo

cmake/scripts/buildinfo.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if (EXISTS ${ETH_SOURCE_DIR}/prerelease.txt)
2626
string(STRIP "${SOL_VERSION_PRERELEASE}" SOL_VERSION_PRERELEASE)
2727
else()
2828
string(TIMESTAMP SOL_VERSION_PRERELEASE "develop.%Y.%m.%d" UTC)
29+
string(REPLACE .0 . SOL_VERSION_PRERELEASE "${SOL_VERSION_PRERELEASE}")
2930
endif()
3031

3132
if (EXISTS ${ETH_SOURCE_DIR}/commit_hash.txt)

scripts/build_emscripten.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
set -e
3030

3131
if [[ "$OSTYPE" != "darwin"* ]]; then
32-
date -u +"nightly.%Y.%m.%d" > prerelease.txt
32+
date -u +"nightly.%Y.%-m.%-d" > prerelease.txt
3333
./scripts/travis-emscripten/install_deps.sh
3434
docker run -v $(pwd):/src trzeci/emscripten:sdk-tag-1.35.4-64bit ./scripts/travis-emscripten/build_emscripten.sh
3535
fi

scripts/release_ppa.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ cd solc
5454
version=`grep -oP "PROJECT_VERSION \"?\K[0-9.]+(?=\")"? CMakeLists.txt`
5555
commithash=`git rev-parse --short HEAD`
5656
committimestamp=`git show --format=%ci HEAD | head -n 1`
57-
commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10`
57+
commitdate=`git show --format=%ci HEAD | head -n 1 | cut - -b1-10 | sed -e 's/-0?/./' | sed -e 's/-0?/./'`
5858

5959
echo "$commithash" > commit_hash.txt
6060
if [ $branch = develop ]

scripts/travis-emscripten/publish_binary.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ VER=$(cat CMakeLists.txt | grep 'set(PROJECT_VERSION' | sed -e 's/.*set(PROJECT_
3434
test -n "$VER"
3535
VER="v$VER"
3636
COMMIT=$(git rev-parse --short HEAD)
37-
DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%Y.%m.%d)
37+
DATE=$(date --date="$(git log -1 --date=iso --format=%ad HEAD)" --utc +%Y.%-m.%-d)
38+
39+
# remove leading zeros in components - they are not semver-compatible
40+
COMMIT=$(echo "$COMMIT" | sed -e 's/^0*//')
3841

3942
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
4043
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"

0 commit comments

Comments
 (0)