Chocolatey: Upgrade packaging to 2.4.2.
MODIFY
chocolatey/README.adoc
chocolatey/README.adoc
@@ -12,6 +12,16 @@ 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:
----
@@ -30,3 +40,9 @@ https://chocolatey.org/docs/create-packages .
# Push the package to chocolatey.org.
> choco push --api-key=your-api-key asciidoctorj.x.y.z.nupkg
----
+
+. Add back whitespace:
+
+----
+git checkout -- tools
+----
\ No newline at end of file

MODIFY
chocolatey/asciidoctorj.nuspec
chocolatey/asciidoctorj.nuspec
<!-- Read this before publishing packages to chocolatey.org: https://github.com/chocolatey/chocolatey/wiki/CreatePackages -->
<id>asciidoctorj</id>
<title>AsciidoctorJ (Install)</title>
- <version>2.3.0</version>
+ <version>2.4.2</version>
<!--
https://github.com/asciidoctor/asciidoctorj/graphs/contributors
https://github.com/asciidoctor/asciidoctor/graphs/contributors

MODIFY
chocolatey/tools/chocolateyinstall.ps1
chocolatey/tools/chocolateyinstall.ps1
$ErrorActionPreference = 'Stop'; # stop on all errors
-$adocjVersion = '2.3.0'
+$adocjVersion = '2.4.2'
$packageName= 'asciidoctorj' # arbitrary name for the package, used in messages
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
# Which is the preferred mirror? There are many listed at
@@ -18,7 +18,7 @@ $packageArgs = @{
packageName = $packageName
unzipLocation = $toolsDir
url = $url
- checksum = '2557edc4db4787aa0b3f5266728414862fa770a92f8d6ac407b34c47b4b02e7c'
+ checksum = '3b5cb8d3a31aa88b3152f4a6983d4f56b3f3fda913328ffa4e3d451aba5697ea'
checksumType = 'sha256' #default is md5, can also be sha1
#checksum64 = ''
#checksumType64= 'md5' #default is checksumType

Chocolatey: Upgrade packaging to 2.4.2.