- Check the Zola GitHub releases page for the latest version.
- Note the new version number (e.g.,
0.20.0
).
- Open
zola.nuspec
in your text editor. - Update the version number in the
<version>
tag. - 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<
- Replace
>
with>
- Replace
&
with&
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"
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
- Open
chocolateyInstall.ps1
in your text editor. - Update the
checksum
variable with the new SHA256 checksum.
- Navigate to the directory containing your updated Zola package:
cd path\to\chocolatey-packages\zola
- Pack the updated package:
choco pack .\zola.nuspec
- 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).
- Verify the installation:
zola --version
Ensure that the version number matches the one you just packaged.
- Test basic functionality:
zola init test
cd test
zola build
If these commands complete without errors, your package is working correctly.
- Uninstall the test package:
choco uninstall zola -y
- 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.