knope icon indicating copy to clipboard operation
knope copied to clipboard

Support Dotnet packages

Open husseinraoouf opened this issue 1 year ago • 5 comments

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>

husseinraoouf avatar Apr 16 '24 06:04 husseinraoouf

Just to double check you just want to be able to increment the version number specified in the [packageName].csproj file?

alex-way avatar May 07 '24 19:05 alex-way

yes excatly

husseinraoouf avatar May 09 '24 12:05 husseinraoouf

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

alex-way avatar May 09 '24 18:05 alex-way

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

alex-way avatar May 09 '24 18:05 alex-way