Skip to content

Commit

Permalink
Staging for version increment automation (#91)
Browse files Browse the repository at this point in the history
* Version increment automation

Signed-off-by: pgodithi <pgodithi@amazon.com>
(cherry picked from commit 38e663e)
  • Loading branch information
prudhvigodithi authored and github-actions[bot] committed Aug 1, 2022
1 parent b42d988 commit 05b29ea
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,15 @@ jacocoTestReport {
}

check.dependsOn jacocoTestCoverageVerification
jacocoTestCoverageVerification.dependsOn jacocoTestReport
jacocoTestCoverageVerification.dependsOn jacocoTestReport

// 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(file:'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags:'g', byline:true)
}
}

0 comments on commit 05b29ea

Please sign in to comment.