Repository navigation
Release: render casks without deprecated Homebrew DSL - #4
Merged
Merged
Conversation
Every brew command that loads the published @beta cask printed two deprecation warnings, and deprecations later turn into errors: - Calling `postflight` is deprecated! Use `postflight_steps` instead. - Calling string comparison format for `depends_on macos:` is deprecated! Use `depends_on macos: :sonoma` instead. render_cask.py now emits `postflight_steps` with `run "/usr/bin/xattr"` and an install-time {{appdir}} token instead of `system_command` with Ruby #{appdir} interpolation. Behavior is the same: the command must succeed, stderr is shown and stdout is hidden. The template uses depends_on macos: :sonoma, which means the same as ">= :sonoma", and its desc is trimmed to 71 characters (brew style's limit is 80), so every rendered variant passes brew style. Tests now check the steps form and that signed builds get no flight stanza at all. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The published
focusrite-volume-control@betacask prints two deprecation warnings on every brew command, and Homebrew deprecations later become errors:Calling postflight is deprecated! Use postflight_steps instead.Calling string comparison format for depends_on macos: is deprecated! Use depends_on macos: :sonoma instead.The tap is rendered from this repo on every release, so the fix has to live here too, or the next release brings the old forms back. Tap side: enum-dot-dev/homebrew-focusrite-volume-control#1.
Changes
scripts/render_cask.pyemitspostflight_stepswithrun "/usr/bin/xattr"and an install-time{{appdir}}token instead ofsystem_commandwith Ruby#{appdir}. Same behavior: must succeed, stderr shown, stdout hidden.depends_on macos: :sonoma(same meaning as">= :sonoma"), desc trimmed to 71 characters for brew style's 80-character limit.Verified
python3 -m unittest discover -s scripts -p 'test_*.py': 8 tests passbrew style: no offenses on all 8 rendered variants (stable/beta, signed/unsigned, with and without auto_updates)🤖 Generated with Claude Code