Skip to content

Commit

Permalink
Chocolatey: Upgrade packaging to 2.4.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldcombs committed Nov 12, 2020
1 parent 8793c1f commit e5b6313
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
16 changes: 16 additions & 0 deletions chocolatey/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:

----
Expand All @@ -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
----
2 changes: 1 addition & 1 deletion chocolatey/asciidoctorj.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- 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
Expand Down
4 changes: 2 additions & 2 deletions chocolatey/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

$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
Expand All @@ -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
Expand Down

0 comments on commit e5b6313

Please sign in to comment.