Closed DoctorKrolic closed 8 months ago
(thanks!)
It is hard to use external version sources other than git tags since I cannot think of an easy way to pass command line arguments to the publish script during prepublish stage. This PR reduces human error impact by forcing a release build when building vsix, but it doesn't fully eliminate it since the person still needs to update version in package.json
and create a git tag. The other possible way of handling this is by separating extension client form the language server entirely and download langusge server bits on demand during the first time usage (official C# extension does that for instance), but I don't think it provides that much value for us
I think GitVersion is available as a .net cli tool (i.e. dotnet tool install GitVersion
or similar)…
Fixes: https://github.com/tintoy/msbuild-project-tools-vscode/issues/126
Now whenever
vsce package
is run language server is gonna be built in release mode. This script also parses semantic version information from the git. Let's say previous commit was taggedv0.5.0-pre1
. When building with--dev
flag produced version prefix is0.5.0
, suffix ispre1-dev
, resulting version0.5.0-pre1-dev
and file version0.5.0.1
(1 represents number of commits from the previous tag). If building without--dev
flag the version is just0.5.0-pre1
without an additionaldev
suffix. This eliminates the need of having 2 build scripts which require passing version information manually, so I removed them. Now when you doing a release your algorithm is:vsce package
And that is it. The resulting
vsix
will contain langusge server built in release mode with correct version metadata in place