Skip to content

Commit

Permalink
test pr
Browse files Browse the repository at this point in the history
Signed-off-by: Bharathwaj G <[email protected]>
  • Loading branch information
bharath-techie committed Aug 9, 2022
1 parent e7d73c8 commit 769930d
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ allprojects {
}

dependencies {
testCompile ('junit:junit:4.12') {
testCompile ('junit:junit:4.13.2') {
exclude group: 'org.hamcrest'
}
testCompile "org.opensearch.plugin:reindex-client:${opensearch_version}"
Expand Down Expand Up @@ -189,4 +189,23 @@ run {
}
}

// updateVersion: Task to auto increment to the next development iteration
task updateVersion {
onlyIf { System.getProperty('newVersion') }
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/build.yml")
include(name: ".github/workflows/multi-node-test-workflow.yml")

}
}
ant.replaceregexp(file:'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags:'g', byline:true)
}
}

apply from: 'build-tools/pkgbuild.gradle'

0 comments on commit 769930d

Please sign in to comment.