skarpdev / dotnet-version-cli

dotnet version cli (similar to npm version cli)
MIT License
38 stars 12 forks source link

Dry-run option is not behaving as expected #98

Closed feliperomero3 closed 8 months ago

feliperomero3 commented 1 year ago

When using the --dry-run option the tool still changes the csproj, writes the commit and creates the tag.

From reading the README file on this project, I'd expected the tool to only output the version number calculated when using the --dry-run option.

Example commands to reproduce the unexpected behavior:

dotnet version --prefix preview preminor --dry-run
dotnet version preminor --dry-run

If you need more information let me know.

PS: the .NET project I tried this tool on was this.

Thanks for the tool.

nover commented 1 year ago

Hi,

Thanks for the report, and for using the tool :)

that is most definitely a bug and regression. Dry run must not alter anything.

pingvinen commented 9 months ago

A bit late to the party, but is this not because the --dry-run is in the wrong place? Should the above command not be dotnet version --dry-run --prefix preview preminor?

See #27

nover commented 9 months ago

A bit late to the party, but is this not because the --dry-run is in the wrong place? Should the above command not be dotnet version --dry-run --prefix preview preminor?

See #27

I think you're right.

feliperomero3 commented 8 months ago

A bit late to the party, but is this not because the --dry-run is in the wrong place? Should the above command not be dotnet version --dry-run --prefix preview preminor?

See #27

This is correct. Thank you @pingvinen

Closing this issue as resolved.

Thanks for the tool.