-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Staging for version increment automation #1932
Changes from 4 commits
2ea5cce
343110f
61f46c3
4846359
fce900c
5cdfaff
a4f16fb
8c9a499
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -486,3 +486,20 @@ afterEvaluate { | |
tasks = ['build', 'buildRpm', 'buildDeb'] | ||
} | ||
} | ||
|
||
// versionIncrement: Task to auto increment to the next development iteration | ||
task versionIncrement { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a test for this, see example tests in https://github.com/opensearch-project/security/blob/main/.github/workflows/ci.yml#L124 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added @peternied can you please check. |
||
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: "bwc-test/build.gradle") | ||
} | ||
} | ||
ant.replaceregexp(file:'build.gradle', match: '"opensearch.version", "\\d.*"', replace: '"opensearch.version", "' + newVersion.tokenize('-')[0] + '-SNAPSHOT"', flags:'g', byline:true) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This executes the command, but doesn't verify any outcome.
What do you think about adding a execution of the gradle task
assemble
, check the artifact is version X, then run theversionIncrement
task, thenassemble
and check its version X+1