Custom scripts
With NPM, I can make a script in my package.json named version. This script will run after changing the package.json version, but before creating the git commit. See order of execution in the NPM version docs.
I would like to see something similar here. I don't know how you would go about implementing it though.
In my specific case, I would like to run a script that versions my Helm charts appVersion with the same value as the .csproj version, and then adds the chart to the same git commit. And I'm sure it could be useful in many other scenarios as well.
@h3rmanj thanks for the issue.
I agree, it would be really nice to have and the thought have crossed my mind before.
I guess we would have to do something along the lines of allowing you to define both the interpreter and script to execute.
A workaround to achieve something similar we usually do is the following:
- We create a script (powershell / bash) that uses
dotnet versionunderneath while disabling commits - We go about updating versions in many csproj files and do other things
- Add it all to
gitand commit + tag
You can see an example of such script over here: https://github.com/rapidcore/rapidcore/blob/master/Bump-Version.ps1