This commit is contained in:
Telesphoreo 2022-03-26 17:50:59 -05:00
parent 56e71b10fa
commit e5ae89a072

View File

@ -88,14 +88,10 @@ static def getDate() {
return new Date().format("MM/dd/yyyy '<light_purple>at<gold>' hh:mm:ss a") return new Date().format("MM/dd/yyyy '<light_purple>at<gold>' hh:mm:ss a")
} }
ext {
buildNumber = System.getenv("JENKINS_URL") != null ? System.getenv("BUILD_NUMBER") : getBuildNumber()
}
task buildProperties { task buildProperties {
ant.propertyfile(file: "$project.rootDir/src/main/resources/build.properties") { ant.propertyfile(file: "$project.rootDir/src/main/resources/build.properties") {
entry(key: "buildAuthor", default: System.getenv("JENKINS_URL") != null ? "jenkins" : "unknown") entry(key: "buildAuthor", default: System.getenv("JENKINS_URL") != null ? "jenkins" : "unknown")
entry(key: "buildNumber", value: buildNumber) entry(key: "buildNumber", value: System.getenv("JENKINS_URL") != null ? System.getenv("BUILD_NUMBER") : getBuildNumber())
entry(key: "buildDate", value: getDate()) entry(key: "buildDate", value: getDate())
entry(key: "buildHead", value: getGitHash()) entry(key: "buildHead", value: getGitHash())
} }