quamotion / dotnet-packaging

Extensions for the .NET Core CLI which help packaging and publishing .NET Core applications
MIT License
654 stars 85 forks source link

> postinst expanded #255

Open CryoViking opened 1 month ago

CryoViking commented 1 month ago
          > My next thing is figuring out how to run a preinst and postinst script

Resave the csproj file to use LF line endings, and put scripts inside <PropertyGroup> <PostInstallScript><![CDATA[ ]]></PostInstallScript> (<PreRemoveScript>).

Originally posted by @atauenis in https://github.com/quamotion/dotnet-packaging/issues/253#issuecomment-2354808395

Is there any chance you can expand upon this for me please. Once I get a working example (The example project in the repo has the tags but doesn't actually do anything) I could make a PR with an extension to the README for this.

atauenis commented 1 month ago

Look at example here: https://github.com/atauenis/webone/blob/dev/WebOne.csproj

It's working without known problems. May be it can be used as source for your research.

Also: https://manpages.debian.org/testing/dpkg-dev/deb-postinst.5.en.html, https://manpages.debian.org/testing/dpkg-dev/deb-preinst.5.en.html, https://manpages.debian.org/testing/dpkg-dev/deb-postrm.5.en.html, https://manpages.debian.org/testing/dpkg-dev/deb-prerm.5.en.html.