This directory contains the necessary configuration files for creating a Chocolatey package based on a designated "asciidoctorj-x.y.z-bin.zip" file.
Complete instructions on creating Chocolatey packages can be found at https://chocolatey.org/docs/create-packages.
-
Set the desired package version in 'asciidoctorj.nuspec' and 'tools\chocolateyinstall.ps1'.
-
Commit your changes.
-
Chocolatey doesn’t like whitespace in its packaging files. In PowerShell, run the following from the current directory:
foreach ($f in @('tools\chocolateyinstall.ps1', 'tools\chocolateyinstall.ps1')) { gc $f | ? {$_ -notmatch "^\s*#"} | % {$_ -replace '(^.*?)\s*?[^``]#.*','$1'} | Out-File $f+".~" -en utf8; mv -fo $f+".~" $f }
-
Run the following commands:
# Create the package > cd c:\to\this\directory > choco pack # Test the package. You'll probably have to run this as administrator. > choco install .\asciidoctorj.x.y.z.nupkg -dv -s . > where asciidoctorj > asciidoctorj --help > asciidoctorj ...other test commands # Log into https://chocolatey.org/account and copy your API key. # (This assumes you don't have a key set in your Chocolatey config.) # Push the package to chocolatey.org. > choco push --api-key=your-api-key asciidoctorj.x.y.z.nupkg
-
Add back whitespace:
git checkout -- tools