-
Notifications
You must be signed in to change notification settings - Fork 30
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
Change default version to 0.0.0 #359
Change default version to 0.0.0 #359
Conversation
@@ -93,6 +93,12 @@ public static String getCurrentBallerinaVersion() { | |||
setInstallerVersion(installerVersionFilePath); | |||
} | |||
} | |||
String ballerinaVersionFilePath = OSUtils.getBallerinaVersionFilePath(); | |||
if (!new File(ballerinaVersionFilePath).exists()) { | |||
String defaultBallerinaVersion = "0.0.0"; |
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.
Lets move this to constant and use everywhere
@@ -113,7 +119,7 @@ public static String getCurrentInstalledBallerinaVersion() { | |||
return getVersion(OSUtils.getInstalledConfigPath()); | |||
} catch (IOException e) { | |||
//If we files does not exist it will be empty and update tool continues without a distribution | |||
return ""; | |||
return "0.0.0"; |
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.
Use constant here as well
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.
Addressed suggestion.
@@ -93,6 +94,12 @@ public static String getCurrentBallerinaVersion() { | |||
setInstallerVersion(installerVersionFilePath); | |||
} | |||
} | |||
String ballerinaVersionFilePath = OSUtils.getBallerinaVersionFilePath(); |
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.
We are not using this variable right? Shall we avoid ?
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.
Updated the PR. OSUtils.getBallerinaVersionFilePath() has been used in a below step as well.
Quality Gate passedIssues Measures |
Purpose
For user agent, we need a Ballerina version and this will change the default Ballerina version from empty string to
0.0.0
.This will fix the issue when we use only the ballerina-update-tool itself to pull a distribution.
Fixes #357
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning