Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(brew): Replace version in artifact names with '__VERSION__' to access checksums from mustache #488

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Aug 28, 2023

This PR is a prerequisite for publishing sentry-wizard to brew (see getsentry/sentry-wizard#406)

When artifact names contain versions (e.g. sentry-wizard-v3.10.0.tgz), it's not possible to access their checksums when publishing to brew, because mustache does not support nested variables. The template for brew formula would have to look something like this, but I couldn't find how to make it work for mustache:

sha256 "{{checksums.sentry-wizard-v{{version}}.tgz}}"

So this PR is simply replacing the version with __VERSION__, if it appears to be in the name of the artifact, when building the checksums dictionary.

Also updated readme to clarify the restrictions on the keys for checksums for the brew target.

Part of getsentry/sentry-wizard#346

src/targets/brew.ts Outdated Show resolved Hide resolved
@romtsn romtsn changed the title fix(brew): Replace version in artifact names with 'latest' to access checksums from mustache fix(brew): Replace version in artifact names with '__VERSION__' to access checksums from mustache Aug 29, 2023
@romtsn romtsn requested a review from tonyo August 29, 2023 16:01
@romtsn romtsn merged commit 73db920 into master Aug 30, 2023
8 checks passed
@romtsn romtsn deleted the rz/fix/no-versions-in-keys-for-brew-target branch August 30, 2023 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants