Encode the .NET version we're targeting in the third NuGet version number by
adding X000 (where X is the .NET version) to the commit distance.
This accomplishes a few goals:
* We automatically compute a different NuGet version depending on the .NET version we're targeting.
* Versions are sorted correctly (.NET 7 nugets have a higher version number than .NET 6 nugets).
* It's possible to see which .NET version a NuGet is targeting from the version.
The downside is:
* The scheme breaks down if we need more than three digits for the commit
distance (possible solution: add another zero, so we add X0000 instead of
X000).
The script does the same thing, except:
* It doesn't use 'bc', but instead bash's intrinsic math support: '$((1+2))' -
because when we execute in bash on Windows, 'bc' might not be available.
* It's easier to debug.
This fixes a problem when we need to compute these values on Windows in CI.