Skip to content

Commit

Permalink
Merge pull request #91 from suganyasuven/version-display
Browse files Browse the repository at this point in the history
Fix display text when marking version
  • Loading branch information
keizer619 authored Feb 15, 2021
2 parents a6bdbdb + 5166b3d commit 69e39f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/ballerinalang/command/util/ToolUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -833,13 +833,13 @@ public static String getType(String version) {
* @param version distribution version
*/
public static String getTypeName(String version) {
char lastChar = version.charAt(version.length() - 1);
if (version.contains("1.")) {
return "jballerina" + " version " + version;
} else if(version.contains("slp")) {
char lastChar = version.charAt(version.length() - 1);
return " Preview " + lastChar;
} else {
String versionId = version.substring(2);
String versionId = version.substring(2, version.length() - 1) + " " + lastChar;
return versionId.substring(0, 1).toUpperCase() + versionId.substring(1);
}
}
Expand Down

0 comments on commit 69e39f3

Please sign in to comment.