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

[Bug] /updateprojectfiles and /output file command line arguments require specific order #3185

Closed
Rahkola opened this issue Sep 7, 2022 · 1 comment
Labels

Comments

@Rahkola
Copy link

Rahkola commented Sep 7, 2022

Describe the bug
When executing GitVersion from command line and speficying both /outputfile and /updateprojectfiles, the tool requires the command line arguments to be in specific order for the tool to work properly. Obviously the /output file argument is used here together with the /outputfile as instructed by documentation.

This command both produces the output file and updates project files:
dotnet gitversion /output file /outputfile version.json /updateprojectfiles

This command only updates project files:
dotnet gitversion /updateprojectfiles /output file /outputfile version.json

Expected Behavior

Processing of the command line arguments is order/position agnostic and arguments can be used in any given order. Or alternatively if a specific order is required, this must be documented in the official documentation page at https://gitversion.net/docs/usage/cli/arguments.

Actual Behavior

version.json output file is not created when executing command dotnet gitversion /updateprojectfiles /output file /outputfile version.json which per current documentation is completely valid .

Proposed Fix

Cmd argument parsing is made order agnostic, or documenation is updated.

Your Environment

  • Version Used:
  • Win 11, Gitversion 5.10.3+Branch.support-5.x.Sha.bc9c9d003e655385e3dd1ba3bd013e04062d2f9b
@Rahkola Rahkola added the bug label Sep 7, 2022
@asbjornu
Copy link
Member

asbjornu commented Sep 8, 2022

We are aware of the fact that our command line parser has … room for improvement. 😅 See #2275.

@asbjornu asbjornu closed this as completed Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants