-
Notifications
You must be signed in to change notification settings - Fork 145
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 #684
Changes from 1 commit
ec10d94
c9f5da3
86af7c7
7ec9819
13c0ad2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: pgodithi <[email protected]>
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,3 +148,29 @@ configurations.all { | |
resolutionStrategy.force 'commons-codec:commons-codec:1.13' | ||
resolutionStrategy.force 'com.google.guava:guava:31.0.1-jre' | ||
} | ||
|
||
// 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: ".github/workflows/sql-workbench-test-and-build-workflow.yml") | ||
include(name: "doctest/build.gradle") | ||
include(name: "build.gradle") | ||
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. one more question, is matching 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. Thanks, I can add more restrictive parsing, will push in my latest commit. 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. Can you please check now @joshuali925 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. approved, last question: i see it's hard coded to use snapshot in build.gradle 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. So until now we all build with |
||
} | ||
} | ||
ant.replaceregexp(file:'sql-jdbc/build.gradle', match:"version '\\d+.\\d+.\\d+.\\d+'", replace:"version " + "'" + newVersion.tokenize('-')[0] + '.0' + "'", flags:'g', byline:true) | ||
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. could you remove this line? sql-jdbc was accidentally bumped in previous PR, but it's a driver and the version should be independent 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. So @joshuali925 there is no version increment in this file 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. Pushed in my latest commit @joshuali925 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. thanks. the latest sql-jdbc release is |
||
ant.replaceregexp(match:'"version": "\\d+.\\d+.\\d+.\\d+', replace:'"version": ' + '"' + newVersion.tokenize('-')[0] + '.0', flags:'g', byline:true) { | ||
fileset(dir: workingDir) { | ||
include(name: "workbench/package.json") | ||
include(name: "workbench/opensearch_dashboards.json") | ||
} | ||
} | ||
ant.replaceregexp(file:'workbench/opensearch_dashboards.json', match:'"opensearchDashboardsVersion": "\\d+.\\d+.\\d+', replace:'"opensearchDashboardsVersion": ' + '"' + newVersion.tokenize('-')[0], 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.
could you also remove this? we don't have version defined in doctest/build.gradle
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.
Pushed in my latest commit @joshuali925