build_win.ps1: Use committer date rather than author date in prerelease.txt

- That's what the Linux/macOS scripts do.
This commit is contained in:
Kamil Śliwak 2020-07-08 20:09:49 +02:00
parent 726c5ff68c
commit 68e416e905

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
}