mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #10771 from ethereum/use-commit-date-in-ci-builds
Commit date in CI build version strings
This commit is contained in:
commit
f9bfceccd1
@ -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