diff --git a/build.gradle b/build.gradle index b0644cab31..8e30fb4914 100644 --- a/build.gradle +++ b/build.gradle @@ -400,6 +400,13 @@ task updateVersion { doLast { ext.newVersion = System.getProperty('newVersion') println "Setting version to ${newVersion}." + // String tokenization to support -SNAPSHOT + 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: ".github/workflows/plugin_install.yml") + } + } ant.replaceregexp(file:'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags:'g', byline:true) } }