Skip to content

Commit

Permalink
Version increment automation (#437)
Browse files Browse the repository at this point in the history
Signed-off-by: pgodithi <[email protected]>
(cherry picked from commit 7af37c8)
  • Loading branch information
prudhvigodithi authored and github-actions[bot] committed Jul 12, 2022
1 parent c924ab1 commit a090b27
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,19 @@ run {
}
}
}

// versionIncrement: Task to auto increment to the next development iteration
task versionIncrement {
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: "build.gradle")
}
}
}
}

0 comments on commit a090b27

Please sign in to comment.