Skip to content
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

Fix help text #329

Merged
merged 8 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ public DistributionCommand(PrintStream printStream) {

@Override
public void execute() {
if (helpFlag) {
printUsageInfo(BallerinaCliCommands.HELP);
return;
}

if (distCommands == null) {
if (helpFlag || distCommands == null) {
printUsageInfo(BallerinaCliCommands.DIST);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
NAME
ballerina-dist-update - Update to latest distribution version
ballerina-dist-update - Update to the latest distribution version

SYNOPSIS
ballerina dist update
ballerina dist update


DESCRIPTION
Ballerina dist update command updates to latest version.
Dist-update updates Ballerina to the latest distribution version.

OPTIONS
Ballerina dist update command takes no options.

EXAMPLES
Update current distribution to latest.
→ ballerina dist update
Update Ballerina to the latest distribution version.
→ ballerina dist update
30 changes: 12 additions & 18 deletions ballerina-command/src/main/resources/cli-help/ballerina-dist.help
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
NAME
DIST - Commands for Ballerina distribution version management
Commands for Ballerina distribution version management

SYNOPSIS
ballerina [-h | --help]
<command> [<args>]
ballerina dist <command> <-h | --help>
ballerina dist <command> [<args>]


DESCRIPTION
This consists of the the sub commands to manage Ballerina distributions.
Sub-commands to manage Ballerina distributions.

OPTIONS

OPTIONS
-h, --help
Print usage details of a command.


BALLERINA COMMANDS
Available commands are:
list List available Ballerina distributions
fetch Pull a given distribution version
pull Pull and use a given distribution version
use Switch to a specific distribution version
update Update to latest distribution version
remove Delete locally installed distribution version


EXAMPLES

Get help on how to use the 'ballerina dist' command.
→ ballerina dist --help
Here is a list of available sub-commands:
list List available Ballerina distributions
fetch Pull a given distribution version
pull Pull and use a given distribution version
use Switch to a specific distribution version
update Update to the latest distribution version
remove Delete a locally installed distribution version
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MaryamZi
We need to keep this file as its referred by the default command. This is used to merge all the help commands together (jballerina + command)

https://github.com/ballerina-platform/ballerina-distribution/blob/release-stage/ballerina-command/src/main/java/org/ballerinalang/command/cmd/DefaultCommand.java#L51

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed that, added it back with 7a88cb7.

Update Tool Commands:
Update Commands:
dist Commands for Ballerina distribution version management
update Update the Ballerina command


See 'ballerina help <command>' for more information on a specific command.

Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
NAME
ballerina-dist-list - List available Ballerina distributions
ballerina-dist-list - List available Ballerina distributions

SYNOPSIS
ballerina dist list
ballerina dist list


DESCRIPTION
Ballerina dist list lists available Ballerina distributions.
Dist-list lists the Ballerina distributions available both locally and remotely.


EXAMPLES
List available Ballerina versions.
→ ballerina dist list
List available Ballerina versions.
→ ballerina dist list
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@ SYNOPSIS


DESCRIPTION
Dist-pull pulls and uses a given Ballerina version from project repository.


OPTIONS
Ballerina dist pull command takes no options.
Dist-pull pulls and uses a given Ballerina version from the remote repository.


EXAMPLES
Install Ballerina 1.0.0 version.
Pull and use Ballerina 1.0.0.
→ ballerina dist pull jballerina-1.0.0

This will download and keep jballerina-1.0.0 distribution and set ballerina command.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
NAME
ballerina-remove - Remove a given distribution version
ballerina-remove - Remove a given distribution version

SYNOPSIS
ballerina dist remove <distribution-version>
ballerina dist remove <distribution-version>


DESCRIPTION
removes the given Ballerina version from project repository.
Dist-remove removes the given Ballerina version from the project repository.

OPTIONS
Ballerina dist remove command takes no options.

EXAMPLES
Remove Ballerina 1.0.0 version.
→ ballerina remove 1.0.0
Remove Ballerina 1.0.0.
→ ballerina dist remove jballerina-1.0.0
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
NAME
ballerina-update - Update to latest Ballerina command version
ballerina-update - Update to the latest Ballerina command version

SYNOPSIS
ballerina update
ballerina update


DESCRIPTION
Ballerina update updates to Ballerina command to latest version.
Update updates the Ballerina command to the latest version.
Kishanthan marked this conversation as resolved.
Show resolved Hide resolved

OPTIONS
Ballerina update command takes no options.

EXAMPLES
Update current Ballerina command to latest.
→ ballerina update
Update the Ballerina command to the latest version.
→ ballerina update
14 changes: 7 additions & 7 deletions ballerina-command/src/main/resources/cli-help/ballerina-use.help
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
NAME
ballerina-dist-use - Use a given distribution version
ballerina-dist-use - Use a given distribution version as the default version

SYNOPSIS
ballerina dist use <distribution-version>
ballerina dist use <distribution-version>


DESCRIPTION
Use pulls and uses a given Ballerina version from project repository.
Use switches to a given Ballerina version from the project repository
as the default version.

OPTIONS
Ballerina dist use command takes no options.

EXAMPLES
Use Ballerina 1.0.0 distribution.
→ ballerina dist use jballerina-1.0.0
Use Ballerina 1.0.0.
→ ballerina dist use jballerina-1.0.0