https://community.chocolatey.org/packages/erlang
The package uses automated synchronization to ensure all Erlang/OTP versions >= 25.0 are available on chocolatey.org.
A GitHub Actions workflow runs daily to:
- Parse the official
otp_versions.tablefrom the Erlang/OTP repository - Query chocolatey.org for published versions
- Detect and publish any missing versions automatically
To manually sync versions:
.\sync-versions.ps1 -ApiKey <ApiKey>Options:
-DryRun- Show what would be done without building/pushing-MinMajorVersion- Set minimum OTP version (default: 25)-SpecificVersion- Process only one version (e.g., "27.3.4")
Examples:
# See what's missing
.\sync-versions.ps1 -DryRun
# Sync all versions >= 25.0
.\sync-versions.ps1 -ApiKey <ApiKey>
# Sync only OTP-28.x versions
.\sync-versions.ps1 -MinMajorVersion 28 -ApiKey <ApiKey>
# Build specific version
.\sync-versions.ps1 -SpecificVersion "27.3.4" -ApiKey <ApiKey>To build and test a specific version manually:
.\package.ps1 -Version <Version> -PackAndTestWhen satisfied, push to chocolatey.org:
.\package.ps1 -Version <Version> -Push -ApiKey <ApiKey>Options:
-SkipTest- Skip installation testing (faster, for batch processing)-Verbose- Show detailed choco output-Debug- Show debug information
Examples:
# Build and test locally
.\package.ps1 -Version "28.1.1" -PackAndTest
# Build and push with testing
.\package.ps1 -Version "27.3.4" -Push -ApiKey <ApiKey>
# Build and push without testing (fast)
.\package.ps1 -Version "26.2.5" -Push -SkipTest -ApiKey <ApiKey>The ApiKey can be found in your account settings at https://community.chocolatey.org/users/account/LogOn
-
sync-versions.ps1- Orchestrates batch processing of missing versions- Parses
otp_versions.tablefrom GitHub - Queries chocolatey.org for published versions
- Calls
package.ps1for each missing version
- Parses
-
package.ps1- Builds and publishes a single Erlang version- Downloads win32 and win64 installers
- Installs to extract ERTS version
- Generates package files from templates
- Packs and optionally tests/pushes
-
Test-Package.ps1- Validates PowerShell scripts with PSScriptAnalyzer
erlang.nuspec.in- Package metadata templatetools/chocolateyInstall.ps1.in- Installation script templatetools/chocolateyUninstall.ps1.in- Uninstallation script template
Placeholders are replaced during build:
@@OTP_VERSION@@- Erlang/OTP version (e.g., "27.3.4")@@ERTS_VERSION@@- ERTS version (e.g., "15.2.7")@@WIN32_SHA256@@- SHA256 checksum for 32-bit installer@@WIN64_SHA256@@- SHA256 checksum for 64-bit installer
validate.yml- Runs PSScriptAnalyzer on every push/PRci.yml- Runssync-versions.ps1daily to auto-publish missing versions