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

Add config command #1056

Merged
merged 2 commits into from
Jun 7, 2022
Merged

Conversation

alexarchambault
Copy link
Contributor

@alexarchambault alexarchambault commented May 31, 2022

This adds a config sub-command, that users can use to set and get values of pre-defined config keys, like

$ scala-cli config user.name "Alex"
$ scala-cli config user.email "alex@alex.me"
$ scala-cli config github.token "file:$HOME/.secrets/scala-cli-gh-token"
$ scala-cli config pgp.public-key
…

These values are meant to be used in the upcoming publish setup sub-command.

Copy link
Contributor

@lwronski lwronski left a comment

Choose a reason for hiding this comment

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

I also have one question for this functionality. Is there an option to remove entry from ConfigDb?

@alexarchambault alexarchambault force-pushed the config-command branch 2 times, most recently from 1c1466e to aa8ea40 Compare June 1, 2022 12:25
Copy link
Contributor

@Gedochao Gedochao left a comment

Choose a reason for hiding this comment

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

if lines of commands in bash command blocks aren't starting with $ and the expected outputs are comments (starting with #), then it becomes possible to run the commands from the doc right in your terminal with a single click from the IDE, while browsing the .md file (screenshot below).

image

applies to the remaining code blocks as well.

website/docs/commands/misc/config.md Outdated Show resolved Hide resolved
website/docs/commands/misc/config.md Outdated Show resolved Hide resolved
website/docs/commands/misc/config.md Show resolved Hide resolved
@alexarchambault alexarchambault force-pushed the config-command branch 4 times, most recently from 65edd00 to da5e3e3 Compare June 1, 2022 17:32
@alexarchambault

This comment was marked as resolved.

@alexarchambault alexarchambault force-pushed the config-command branch 3 times, most recently from 9f2dff5 to d2b6c61 Compare June 6, 2022 11:04
@alexarchambault alexarchambault force-pushed the config-command branch 2 times, most recently from c748250 to c55f68a Compare June 6, 2022 13:47
@alexarchambault alexarchambault requested review from Gedochao and removed request for lwronski June 6, 2022 13:47
Allowing to persist some configuration values in a secured file under the
user home directory, to be used by other Scala CLI commands.
Copy link
Contributor

@lwronski lwronski left a comment

Choose a reason for hiding this comment

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

The only thing is missing for me, the --unset-all option, but that can be added in a separate PR

@alexarchambault alexarchambault merged commit fbb1d30 into VirtusLab:main Jun 7, 2022
@alexarchambault alexarchambault deleted the config-command branch June 7, 2022 08:19
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.

3 participants