Skip to content

Commit

Permalink
Update gradle properties
Browse files Browse the repository at this point in the history
  • Loading branch information
udda1996 committed Jul 13, 2023
1 parent 5bb550f commit ba950e3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jreVersion=11.0.18+10
# For test purpose
swan-lake-version=2201.2.0
swan-lake-spec-version=2022R3
swan-lake-latest-version=2201.5.0
swan-lake-latest-spec-version=2022R4
swan-lake-latest-version=2201.7.0
swan-lake-latest-spec-version=2023R1
1-x-channel-version=1.2.0
1-x-channel-spec-version=2020R1
1-x-channel-latest-version=1.2.38
1-x-channel-latest-version=1.2.40
8 changes: 6 additions & 2 deletions src/main/java/org/ballerinalang/command/cmd/PullCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
package org.ballerinalang.command.cmd;

import org.ballerinalang.command.BallerinaCliCommands;
import org.ballerinalang.command.util.*;
import org.ballerinalang.command.util.Channel;
import org.ballerinalang.command.util.Distribution;
import org.ballerinalang.command.util.ErrorUtil;
import org.ballerinalang.command.util.Tool;
import org.ballerinalang.command.util.ToolUtil;
import picocli.CommandLine;

import java.io.PrintStream;
Expand Down Expand Up @@ -66,7 +70,7 @@ public void execute() {
if (!testFlag) {
// Check and update the tool if any latest version available
Tool toolDetails = ToolUtil.updateTool(printStream);
if (toolDetails.getCompatibility().equals("false")) {
if (!toolDetails.getCompatibility().equals("true")) {
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static void update(PrintStream printStream) {
if (!testFlag) {
// Check and update the tool if any latest version available
Tool toolDetails = ToolUtil.updateTool(printStream);
if (toolDetails.getCompatibility().equals("false")) {
if (!toolDetails.getCompatibility().equals("true")) {
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/ballerinalang/command/util/ToolUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public static Tool getLatestToolVersion() {
tool.setVersion(matcher.group(1));
}

matcher = Pattern.compile("\"compatibility\":\"(.*?)\"").matcher(json);
matcher = Pattern.compile("\"compatibility\":(true|false)").matcher(json);
while (matcher.find()) {
tool.setCompatibility(matcher.group(1));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void listCommandTest() {
Assert.assertTrue(outContent.toString().contains("Distributions available locally"));
Assert.assertTrue(outContent.toString().contains("Distributions available remotely"));
Assert.assertTrue(outContent.toString().contains("1.* channel"));
Assert.assertTrue(outContent.toString().contains("1.2.30"));
Assert.assertTrue(outContent.toString().contains("1.2.40"));
Assert.assertTrue(outContent.toString().contains("Swan Lake channel"));
}

Expand Down

0 comments on commit ba950e3

Please sign in to comment.