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

feat: better CLI configuration setup #661

Merged
merged 3 commits into from
Jun 3, 2022
Merged

Conversation

mathnogueira
Copy link
Member

@mathnogueira mathnogueira commented Jun 3, 2022

This PR adds a command tracetest configure that allows you to define the configuration of the CLI. Now you don't have to manage the config.yml file manually.

Other than that, it also supports a global configuration inside ~/.tracetest/config.yml. This is a fallback configuration that is only used if the current directory doesn't contain any config file in it. You also can write the configuration in the global config file by executing tracetest configure --global.

$ tracetest configure

# (current value: <value>) is only displayed if there is a config.yml file in the directory and it is 
# not empty. It shows the current value of that variable
Enter your Tracetest server URL (current value: http://localhost:8080): 
$ tracetest configure --global

# same thing as above, but the file ~/.tracetest/config.yml must exist for the current
# value be shown to the user
Enter your Tracetest server URL (current value: http://localhost:1234): 

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

@mathnogueira mathnogueira requested a review from schoren June 3, 2022 18:39
Copy link
Collaborator

@schoren schoren left a comment

Choose a reason for hiding this comment

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

Awesome feature!

@mathnogueira mathnogueira merged commit 7cda828 into main Jun 3, 2022
@mathnogueira mathnogueira deleted the feat/cli-configure branch June 3, 2022 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants