chore (build): leave dateTime out of locally-built versionInfo

To avoid gradle deciding that engine's build is always stale.
develop
Kevin Turner 2021-01-17 16:08:03 -08:00
parent 474a312704
commit a4a966514f
1 changed files with 9 additions and 1 deletions

View File

@ -238,10 +238,18 @@ def createVersionInfoFile = tasks.register("createVersionInfoFile", WritePropert
jobName: env.JOB_NAME,
gitBranch: convertGitBranch(env.GIT_BRANCH),
gitCommit: env.GIT_COMMIT,
dateTime: startDateTimeString,
displayVersion: displayVersion,
engineVersion: version
].findAll { it.value != null })
if (env.JOB_NAME != null) {
// Only set the dateTime property when there is a Jenkins JOB_NAME.
// It is a value we can always get (on Jenkins or otherwise) but we don't want local builds
// to invalidate their cache whenever the time changes.
// TODO: after upgrading to Gradle 6.8, see if we can have it ignore this property specifically:
// https://docs.gradle.org/current/userguide/more_about_tasks.html#sec:property_file_normalization
property("dateTime", startDateTimeString)
}
outputFile = "$buildDir/createVersionInfoFile/versionInfo.properties"
}