knope
knope copied to clipboard
Support Dotnet packages
I wanted to use knope for all packages i publish, i currently publish nodejs, python, and dotnet packages and it doesn't support dotnet, it would be great to add support for dotnet packages, dotnet packages handle [packageName].csproj it is an xml file with structure defined here https://learn.microsoft.com/en-us/aspnet/web-forms/overview/deployment/web-deployment-in-the-enterprise/understanding-the-project-file
for a simple package the file will look like this
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Authors>Package Author</Authors>
<Description>Package Description</Description>
<PackageIcon>icon.png</PackageIcon>
<PackageLicenseExpression></PackageLicenseExpression>
<Version>0.0.0</Version>
</PropertyGroup>
</Project>
Just to double check you just want to be able to increment the version number specified in the [packageName].csproj file?
yes excatly
Looks like the answer is to create a module within crates/knope-versioning/src/
e.g. https://github.com/knope-dev/knope/blob/72fb94c104328c1e85c68c056c5ab99bacad5ef6/crates/knope-versioning/src/pyproject.rs
Will investigate further to see if I'm able to assist
Further onto the above, it looks as though there isn't an xml parser. Suggesting we use https://crates.io/crates/serde-xml-rs to be inline with the other parsers in the knope-versioning crate