From 9612cf0ca393d93c3f49d18ed1e9e6da1aef6920 Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Wed, 4 Jan 2023 14:04:10 -0800 Subject: [PATCH 1/2] Add script for workflow version increment Signed-off-by: Ryan Liang --- build.gradle | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.gradle b/build.gradle index cd172d7ba3..2f85112ac9 100644 --- a/build.gradle +++ b/build.gradle @@ -647,5 +647,10 @@ task updateVersion { } } ant.replaceregexp(file:'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags:'g', byline:true) + ant.replaceregexp(match: 'OPENSEARCH_VERSION: .*', replace: 'OPENSEARCH_VERSION: ' + newVersion, flags:'g', byline:true){ + fileset(dir: projectDir) { + include(name: ".github/workflows/plugin_install.yml") + } + } } } From e81979fa6e38456259a44e23c2dd325aee18e51c Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Fri, 6 Jan 2023 09:08:43 -0800 Subject: [PATCH 2/2] Add the workflow file path to the original task Signed-off-by: Ryan Liang --- build.gradle | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 2f85112ac9..31ca010a20 100644 --- a/build.gradle +++ b/build.gradle @@ -644,13 +644,9 @@ task updateVersion { fileset(dir: projectDir) { // Include the required files that needs to be updated with new Version include(name: "bwc-test/build.gradle") - } - } - ant.replaceregexp(file:'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags:'g', byline:true) - ant.replaceregexp(match: 'OPENSEARCH_VERSION: .*', replace: 'OPENSEARCH_VERSION: ' + newVersion, flags:'g', byline:true){ - fileset(dir: projectDir) { 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) } }