From 52fcb6511906a63345caff2f86d8f3f6d4ff99ee Mon Sep 17 00:00:00 2001 From: pgodithi Date: Tue, 12 Jul 2022 18:36:42 -0400 Subject: [PATCH] Version increment automation: task rename updateVersion Signed-off-by: pgodithi --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index a1428fb4..d3eecef9 100644 --- a/build.gradle +++ b/build.gradle @@ -793,8 +793,8 @@ afterEvaluate { bundlePlugin.mustRunAfter unpackRca -// versionIncrement: Task to auto increment to the next development iteration -task versionIncrement { +// updateVersion: Task to auto increment to the next development iteration +task updateVersion { onlyIf { System.getProperty('newVersion') } doLast { ext.newVersion = System.getProperty('newVersion') @@ -803,9 +803,9 @@ task versionIncrement { ant.replaceregexp(match: opensearch_version.tokenize('-')[0], replace: newVersion.tokenize('-')[0], flags:'g', byline:true) { fileset(dir: projectDir) { // Include the required files that needs to be updated with new Version - include(name: "build.gradle") include(name: "src/main/resources/plugin-descriptor.properties") } } + ant.replaceregexp(file:'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags:'g', byline:true) } }