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
feat(java): add LTS versioning scheme and releaser #810
Conversation
Codecov Report
@@ Coverage Diff @@
## master #810 +/- ##
==========================================
+ Coverage 93.28% 93.56% +0.27%
==========================================
Files 63 64 +1
Lines 8888 8870 -18
Branches 919 930 +11
==========================================
+ Hits 8291 8299 +8
+ Misses 594 568 -26
Partials 3 3
Continue to review full report at Codecov.
|
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.
I was picturing us making the version bumping configurable, I like the approach you've instead taken of introducing a new releaser -- seems like it's ultimately a bit less complex.
I think it might be worth us adding some guides, such as docs/java-releases.md
to a docs
folder, so that external users can learn about our best practices -- what releasers are good for what tasks.
Perhaps open an enhancement issue for this?
const currentVersions = VersionsManifest.parseVersions( | ||
versionsManifestContent.parsedContent | ||
); | ||
export class JavaBom extends JavaYoshi { |
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.
awesome, I love that you can extend the JavaYoshi
base class now.
protected async getVersionManifestContent(): Promise<GitHubFileContents> { | ||
if (!this.versionsManifestContent) { | ||
this.versionsManifestContent = await this.gh.getFileContents( | ||
'versions.txt' |
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.
maybe add a TODO to consolidate with @joeldodge79's manifest format eventually, if we can figure out an approach that works for both needs?
if (match[4] === '-SNAPSHOT') { | ||
snapshot = true; | ||
let lts = undefined; | ||
if (match[4]) { |
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.
I'd be tempted to use named regexes here, just so we have less magic numbers.
@@ -14,49 +14,57 @@ | |||
|
|||
import {BumpType} from './bump_type'; | |||
|
|||
const VERSION_REGEX = /(\d+)\.(\d+)\.(\d+)(-\w+)?(-SNAPSHOT)?/; | |||
const VERSION_REGEX = /(\d+)\.(\d+)\.(\d+)(-.+)?/; |
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.
wondering if it's worth pulling these files into a utils/
subfolder, maybe it's not worth the extra nesting? i'm on the fence.
Adds a custom versioning scheme for Java.
To support service pack/LTS releases, we use a separate versioning scheme. The first LTS release after a mainline release will bump 1 patch version and add the
-lts.1
qualifier. Future LTS releases to that branch will bump the LTS number (e.g. the next version would be-lts.2
.This also converts the JavaBom releaser to use stable branch names.
Example PRs:
snapshot after branch created
LTS release PR