Skip to content

Files

Latest commit

f580875 · Apr 15, 2021

History

History
This branch is up to date with asciidoctor/asciidoctorj:master.

chocolatey

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 2, 2021
Apr 15, 2021
Apr 15, 2021

AsciidoctorJ Chocolatey package.

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.

Quick Instructions

  1. Set the desired package version in 'asciidoctorj.nuspec' and 'tools\chocolateyinstall.ps1'.

  2. Commit your changes.

  3. 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
}
  1. 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
  1. Add back whitespace:

git checkout -- tools