Add missing up-to-date configuration (#35255)

* Add missing up-to-date configuration

The source properties file and the dynamic elasticsearch version
(set based on properties ) were missing from task outputs leading
to the task being incorrectly considered up to date.

Closes #35204
This commit is contained in:
Alpar Torok 2018-11-06 14:00:40 +02:00 committed by GitHub
parent 999f8f5850
commit 58f3e81555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -44,9 +44,13 @@ if (project == rootProject) {
// we update the version property to reflect if we are building a snapshot or a release build
// we write this back out below to load it in the Build.java which will be shown in rest main action
// to indicate this being a snapshot build or a release build.
Properties props = VersionPropertiesLoader.loadBuildSrcVersion(project.file('version.properties'))
File propsFile = project.file('version.properties')
Properties props = VersionPropertiesLoader.loadBuildSrcVersion(propsFile)
version = props.getProperty("elasticsearch")
processResources {
inputs.file(propsFile)
// We need to be explicit with the version because we add snapshot and qualifier to it based on properties
inputs.property("dynamic_elasticsearch_version", props.getProperty("elasticsearch"))
doLast {
Writer writer = file("$destinationDir/version.properties").newWriter()
try {