-
Notifications
You must be signed in to change notification settings - Fork 75
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
BLADE-738 Blade can not recognized "dxp-2023.q3.1" as a valid product key in product.json file. #315
Merged
drewbrokke
merged 12 commits into
liferay:master
from
drewbrokke:BLADE-738-BUG-v1-product-key-comparator-to-send
Nov 14, 2023
Merged
BLADE-738 Blade can not recognized "dxp-2023.q3.1" as a valid product key in product.json file. #315
drewbrokke
merged 12 commits into
liferay:master
from
drewbrokke:BLADE-738-BUG-v1-product-key-comparator-to-send
Nov 14, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drewbrokke
force-pushed
the
BLADE-738-BUG-v1-product-key-comparator-to-send
branch
from
November 10, 2023 21:25
e2e5f00
to
92d08d5
Compare
drewbrokke
force-pushed
the
BLADE-738-BUG-v1-product-key-comparator-to-send
branch
3 times, most recently
from
November 13, 2023 18:36
a24f8c4
to
f1c8772
Compare
drewbrokke
force-pushed
the
BLADE-738-BUG-v1-product-key-comparator-to-send
branch
from
November 13, 2023 19:12
f1c8772
to
7e9de89
Compare
gamerson
approved these changes
Nov 14, 2023
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.
Looks good to me! (just with two comments)
cli/src/main/java/com/liferay/blade/cli/util/ProductKeyUtil.java
Outdated
Show resolved
Hide resolved
+1
…On Tue, Nov 14, 2023 at 9:47 AM Drew Brokke ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In cli/src/main/java/com/liferay/blade/cli/util/ProductKeyInfo.java
<#315 (comment)>
:
> + */
+public class ProductKeyInfo implements Comparable<ProductKeyInfo> {
+
+ @OverRide
+ public int compareTo(final ProductKeyInfo keyInfo) {
+ return Comparator.comparing(
+ ProductKeyInfo::getProductRank
+ ).thenComparing(
+ ProductKeyInfo::isQuarterly
+ ).thenComparing(
+ ProductKeyInfo::getMajorProductKeyVersion
+ ).thenComparing(
+ ProductKeyInfo::getMinorProductKeyVersion
+ ).thenComparing(
+ ProductKeyInfo::getMicroProductKeyVersion
+ ).reversed(
The way the comparators are written, the "winners" will sink to the
bottom, the way that 9 would "win" over 7 and come later in the list. So
this reverse puts all the winners on top instead.
—
Reply to this email directly, view it on GitHub
<#315 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAERKFKU43EK7RAQECKCL4TYEOHBPAVCNFSM6AAAAAA7GTRTIOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMZQGA3TAMBVHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Greg Amerson
Liferay Cloud. liferay.com
|
…f product key strings
…based on latest product info
drewbrokke
force-pushed
the
BLADE-738-BUG-v1-product-key-comparator-to-send
branch
from
November 14, 2023 17:06
7e9de89
to
a394703
Compare
ci try again? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an update for BLADE-738.
@simonjhy @gamerson