Skip to content

Latest commit

 

History

History
131 lines (86 loc) · 2.9 KB

Zola Chocolatey release process.md

File metadata and controls

131 lines (86 loc) · 2.9 KB

Zola Chocolatey Package Update Instructions

Preparation

  1. Check the Zola GitHub releases page for the latest version.
  2. Note the new version number (e.g., 0.20.0).

Update Process

1. Update zola.nuspec

  1. Open zola.nuspec in your text editor.
  2. Update the version number in the <version> tag.
  3. Update the changelog based on the Zola CHANGELOG.md.

Note: if the changelog includes special characters like < or >, you need to escape them:

  • Replace < with &lt;
  • Replace > with &gt;
  • Replace & with &amp;

2. Update chocolateyInstall.ps1

Download the Windows release ZIP

Choose the appropriate method based on your operating system:

Windows (PowerShell)
$version = "0.20.0"  # Replace with the new version number.
$url = "https://github.com/getzola/zola/releases/download/v$version/zola-v$version-x86_64-pc-windows-msvc.zip"
Invoke-WebRequest -Uri $url -OutFile "zola-$version.zip"
GNU+Linux/macOS (Bash)
version="0.20.0"  # Replace with the new version number.
url="https://github.com/getzola/zola/releases/download/v$version/zola-v$version-x86_64-pc-windows-msvc.zip"
curl -L -o "zola-$version.zip" "$url"

Calculate the SHA256 checksum

Windows (PowerShell)
$checksum = (Get-FileHash -Path "zola-$version.zip" -Algorithm SHA256).Hash.ToLower()
echo $checksum
GNU+Linux/macOS (Bash)
checksum=$(shasum -a 256 "zola-$version.zip" | awk '{print $1}')
echo $checksum

Update the file

  1. Open chocolateyInstall.ps1 in your text editor.
  2. Update the checksum variable with the new SHA256 checksum.

Package and Push

On Windows

  1. Navigate to the directory containing your updated Zola package:
cd path\to\chocolatey-packages\zola
  1. Pack the updated package:
choco pack .\zola.nuspec
  1. Test the newly created package:
choco install zola --version="$version" --source="." -fy

This command installs the package from the local directory, forcing the installation (-f) and automatically answering yes to prompts (-y).

  1. Verify the installation:
zola --version

Ensure that the version number matches the one you just packaged.

  1. Test basic functionality:
zola init test
cd test
zola build

If these commands complete without errors, your package is working correctly.

  1. Uninstall the test package:
choco uninstall zola -y
  1. If all tests pass, push the new package to Chocolatey:
choco push zola.$version.nupkg --key=YOUR_API_KEY_HERE

Replace YOUR_API_KEY_HERE with your actual Chocolatey API key.