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 flags issue in version cli #2187

Merged
merged 2 commits into from
May 15, 2020

Conversation

sayboras
Copy link
Contributor

@sayboras sayboras commented May 15, 2020

Description

Fixes #2186

Testing

Run eksctl version -h
$ ./eksctl version -h
Output the version of eksctl

Usage: eksctl version [flags]

General flags:
  -o, --output string   specifies the output format (valid option: json)

Common flags:
  -C, --color string   toggle colorized logs (valid options: true, false, fabulous) (default "true")
  -h, --help           help for this command
  -v, --verbose int    set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging (default 3)

Use 'eksctl version [command] --help' for more information about a command.

$ ./eksctl -h        
The official CLI for Amazon EKS

Usage: eksctl [command] [flags]

Commands:
  eksctl create                  Create resource(s)
  eksctl get                     Get resource(s)
  eksctl update                  Update resource(s)
  eksctl upgrade                 Upgrade resource(s)
  eksctl delete                  Delete resource(s)
  eksctl set                     Set values
  eksctl unset                   Unset values
  eksctl scale                   Scale resources(s)
  eksctl drain                   Drain resource(s)
  eksctl utils                   Various utils
  eksctl completion              Generates shell completion scripts for bash, zsh or fish
  eksctl version                 Output the version of eksctl
  eksctl help                    Help about any command

Common flags:
  -C, --color string   toggle colorized logs (valid options: true, false, fabulous) (default "true")
  -h, --help           help for this command
  -v, --verbose int    set log level, use 0 to silence, 4 for debugging and 5 for debugging with AWS debug logging (default 3)

Use 'eksctl [command] --help' for more information about a command.
Make sure eksctl version didn't break
$ ./eksctl version   
0.20.0-dev+480d13a2.2020-05-15T15:23:23Z

$ ./eksctl version -o json | jq
{
  "Version": "0.20.0",
  "PreReleaseID": "dev",
  "Metadata": {
    "BuildDate": "2020-05-15T15:23:23Z",
    "GitCommit": "480d13a2"
  },
  "EKSServerSupportedVersions": [
    "1.13",
    "1.14",
    "1.15",
    "1.16"
  ]
}

$ ./eksctl version 123123123   
Error: unknown command "123123123" for "eksctl version"

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Added labels for change area (e.g. area/nodegroup), target version (e.g. version/0.12.0) and kind (e.g. kind/improvement)
  • Make sure the title of the PR is a good description that can go into the release notes

@sayboras sayboras changed the title Fix flags issue in version Fix flags issue in version cli May 15, 2020
@sayboras
Copy link
Contributor Author

@martina-if @michaelbeaumont @cPu1 simple PR for your review, I didn't write unit test for this, as there might be some work done for #2163, so don't want to over step. I keep the same method name. Let me know if you have think otherwise.

Copy link
Contributor

@martina-if martina-if left a comment

Choose a reason for hiding this comment

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

Thanks @sayboras !

@martina-if martina-if merged commit 2a65f11 into eksctl-io:master May 15, 2020
@sayboras sayboras deleted the bugfix/version-flags branch May 15, 2020 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eksctl version -h didn't show output flag
2 participants