GitReleaseManager icon indicating copy to clipboard operation
GitReleaseManager copied to clipboard

Switch to Spectre.Console Command Line Library

Open gep13 opened this issue 6 years ago • 12 comments

gep13 avatar Feb 06 '19 14:02 gep13

Was planning the same for Gitversion

arturcic avatar Feb 06 '19 14:02 arturcic

Hey @gep13 , have you had a look at this? command-line-api

arturcic avatar Feb 06 '19 15:02 arturcic

@arturcic I have had a look at that yes. I have debated about it, but it feels like there is a bit too much "magic" happening in there for my taste. Might have to have another look, but for now, I think I am happy to proceed with Spectre.Cli.

gep13 avatar Mar 18 '19 15:03 gep13

I was also planning to change the GitVersion command line, and I can see here and in the cake project the chosen library is Spectre.Cli. I might consider the same library for GitVersion.

arturcic avatar Mar 20 '19 10:03 arturcic

I have bumped this to the 0.11.0 version as we can't implement this yet. Not until Spectre.Cli supports set names for options, or until we can remove authentication through Username+Password (first they need to be deprecated though, see #158 for tracking that).

AdmiringWorm avatar Jan 11 '20 15:01 AdmiringWorm

@AdmiringWorm makes sense. Thanks for bumpig this.

gep13 avatar Jan 11 '20 16:01 gep13

Not until Spectre.Cli supports set names for options

Can you please explain what you mean by that? I would like to understand the issue. Thanks!

akordowski avatar Aug 12 '20 14:08 akordowski

@akordowski the CommandLine parser supports providing something called SetName for arguments. This basically allows only certain arguments being available (or required) in some cases, while in other cases a different set of arguments are available.

For example, currently for the commands that reaches out to GitHub we either require a --token to be set, or a --user+--password to be used. These are provided in two different sets.

AdmiringWorm avatar Aug 12 '20 14:08 AdmiringWorm

TBH, I would rather remove the ability to use username+password instead of waiting for sets to be supported (Issue #190), but not sure what @gep13's feelings about that issue are right now.

AdmiringWorm avatar Aug 12 '20 14:08 AdmiringWorm

Ok, I now understand, thanks. As I see the username+password is deprecated by the API due November 13th. I would also recommend them.

akordowski avatar Aug 12 '20 14:08 akordowski

As I mentioned in the issue I linked to, they will actually be removed from the github api on November 13th.

AdmiringWorm avatar Aug 12 '20 14:08 AdmiringWorm

Once this is being implemented, we should at the same time move the current logic of the Commands to the application projects, instead of having them in the *.Core library which is currently being done.

This may require refactoring of the core library if there are some parts of the library that makes use of the Commands (I don't think there is, but there could be).

AdmiringWorm avatar Apr 19 '21 19:04 AdmiringWorm