Merge pull request #10791 from ethereum/committer-date-in-prerelease-txt-on-windows

Use committer date in CI build version strings on Windows
This commit is contained in:
Daniel Kirchner 2021-01-15 20:12:04 +01:00 committed by GitHub
commit 9bf88d5459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ 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=unix --format=%ad HEAD
$last_commit_timestamp = git log -1 --date=unix --format=%cd HEAD
$last_commit_date = (Get-Date -Date "1970-01-01 00:00:00Z").toUniversalTime().addSeconds($last_commit_timestamp).ToString("yyyy.M.d")
-join("ci.", $last_commit_date) | out-file -encoding ascii prerelease.txt
}