mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
ci/build.sh: Use commit date rather than build date in version strings of CI builds
This commit is contained in:
parent
110e0e1f25
commit
a901f78be7
@ -5,10 +5,20 @@ ROOTDIR="$(dirname "$0")/../.."
|
||||
cd "${ROOTDIR}"
|
||||
|
||||
# shellcheck disable=SC2166
|
||||
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" -o -n "$FORCE_RELEASE" ]; then echo -n >prerelease.txt; fi
|
||||
if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" -o -n "$FORCE_RELEASE" ]
|
||||
then
|
||||
echo -n "" >prerelease.txt
|
||||
else
|
||||
# Use last commit date rather than build date to avoid ending up with builds for
|
||||
# different platforms having different version strings (and therefore producing different bytecode)
|
||||
# if the CI is triggered just before midnight.
|
||||
last_commit_timestamp=$(git log -1 --date=iso --format=%ad HEAD)
|
||||
date -d "$last_commit_timestamp" -u "+ci.%Y.%-m.%-d" >prerelease.txt
|
||||
fi
|
||||
|
||||
if [ -n "$CIRCLE_SHA1" ]
|
||||
then
|
||||
echo -n "$CIRCLE_SHA1" >commit_hash.txt
|
||||
echo -n "$CIRCLE_SHA1" >commit_hash.txt
|
||||
fi
|
||||
|
||||
mkdir -p build
|
||||
|
Loading…
Reference in New Issue
Block a user