fix(brew): skip prereleases and add mustache templating for formula names #682
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses two issues with the Brew target from #391:
Prerelease skip: Homebrew doesn't understand prerelease versions like
2.0.0-beta.0, so the Brew target now skips publishing for any preview/prerelease version.Mustache templating for formula names: The
formulaconfig option now supports Mustache-style templates with version variables, allowing versioned formula names that prevent older major patches from overriding newer versions.Usage
Supported template variables
{{{version}}}: Full version string (e.g., "10.2.3"){{{major}}}: Major version number (e.g., "10"){{{minor}}}: Minor version number (e.g., "2"){{{patch}}}: Patch version number (e.g., "3")This follows the same pattern as the AWS Lambda Layer target's
layerNametemplating.Fixes #391.