zaklion.blogg.se

Chocolatey standard notes
Chocolatey standard notes






chocolatey standard notes
  1. Chocolatey standard notes how to#
  2. Chocolatey standard notes install#
  3. Chocolatey standard notes manual#

The installation of the DocFx Companion Tools is done by 1) downloading the zip-file 2) validate the checksum (hash) 3) extract the zip-file in the Chocolatey application cache.

Chocolatey standard notes install#

Once the package is published, you can install the tools using this command: So if you are sure no virus is in the package, you can safely ignore this warning. There is a nice post that even ‘Hello World’ apps get flagged like this. It turns out that it’s flagged by Cylance. This is weird as I know for sure no virus was included in the package 😯. One issue I found is that the Chocolatey package is flagged by the Chocolatey process as one that could contain a virus, but is safe to install. In my experience this took between hours and days. This could take some time, so don’t expect your package to be visible within minutes.

Chocolatey standard notes manual#

This process is partially automated, but also needs manual moderators to give it the final push. The process starts to validate your package. The package is the file with the nupkg extension, which will be uploaded to Chocolatey for processing. Now we can publish the package to that location: You could also point to your own Chocolatey package endpoint if you’re running that in your own environment. The source in this case points to the chocolatey standard publishing endpoint. Now we need to tell the publish command what the API Key is: This creates the package with the version in the name of the file with the nupkg extension. To create the Chocolatey package we’ll use this command: In the pipeline we’ll reference this one for use in the command. That is needed for publication.Īs the API Key is a secret, we have stored it in the securities of the repository (in Settings) and gave it the name CHOCO_TOKEN. Once you have registered, you also can retrieve your API Key. For this purpose you need to create an account with Chocolatey (free). Now we have the package, we can publish it to Chocolatey. You could also have this triggered automatically of course. This way I can determine when I want to publish a new version. I created a release-and-publish workflow which is triggered manually. These changes are not commited to the history, as we don’t need to ‘remember’ this. For this we read the files, make the modifications and save it back. In the GitHub workflow we must modify the nuspec and install script to reflect the published zip-file and the version. The hash is the checksum of the zip-file, so it can’t be spoofed with something else after publication. The url points to the zip-file in the release folder. The packageName must be the same as the id in the nuspec. The chocolateyinstall.ps1 for DocFx Companion Tools Part of the configuration for git version in. The version increment can be specified, and I defined that pushing into the main branch would increase the minor version. There are many forms you can use, but I selected the MajorMinorPatch type (e.g. Simply put, it uses the git history including labels to calculate the version number when building. So I had to come up with a versioning mechanism to provided a version-number for each release. Publishing to Chocolatey requires a version number. NET runtime being available on the machine, so I don’t have to include it which would make the exe much larger. As Chocolatey is a PowerShell based tool, I just published the win-圆4 version of the exe. When you publish a single file, you must provide the -r parameter to indicate the platform and architecture you want to build for. I used this dotnet command for this purpose:ĭotnet publish MySoltutionName -c Release -r win-圆4 /p:PublishSingleFile=true /p:CopyOutputSymbolsToPublishDirectory=false - self-contained false -o. So I used the option publishing an executable as a single exe, which is possible from. For distribution, I like a more cleaner model. But when you compile a Console Application, you see a folder with a lot of DLL’s, the EXE and other files.

chocolatey standard notes

That’s why I published this in this post 🤓.

Chocolatey standard notes how to#

There is lots of information on Chocolatey and how to publish, but it took me some while to get to a solution for this simple scenario. This brought me to investigating time publishing the tools to Chocolatey for easy reuse binaries in a pipeline (or locally) on Windows. Of course that brings a lot of issues with it as well, especially when updates occur on the tools. One of the ‘problematic’ parts of the solution, was that you had to copy over (or fork) the sources of the tools for use. In my previous post Providing quality documentation in your project with DocFx and Companion Tools I explained how we created companion tools to help you validate markdown documentation and to generate a table of contents for use with DocFx. NET Console App to Chocolatey using GitHub Actions








Chocolatey standard notes