fix(scripts): make the cask bump run on Linux - #55
Merged
Conversation
mktemp -t <prefix> is BSD-only: GNU mktemp rejects a template with no X, so the bump job died before downloading anything. Passing a full template with its own X's works on both.
The bug above was invisible locally — the script is written on macOS and run on Linux. A dry run against the tap and the latest release exercises the download, the hashing and both substitutions on the platform that matters.
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.
Why
v0.3.1 published fine, then
bump-caskdied on its first line of real work:mktemp -t <prefix>is BSD behaviour — macOS appends the random suffix itself, GNU mktemp refuses a template without X's. The script is written and rehearsed on macOS and runs onubuntu-latest, so nothing local could have caught it. The 0.3.1 cask bump never happened; the tap is still on 0.3.0.What
$TMPDIR/notchbar-dmg.XXXXXX), which both implementations accept.cask-bumpjob to CI: on every pull request, onubuntu-latest, it checks out the tap and dry-runs the real script against the latest release. It downloads the .dmg, hashes it and performs both substitutions — the exact path that broke — and stops before any push. This is the regression test for the class of bug, not just this line.Verification
The new CI job on this PR is the verification: it is the same script, on the same OS as the release job.
bash -nclean, both workflows parse. The end-to-end proof is the next tag — the tap PR has to appear and auto-merge on its own.The 0.3.1 release itself is untouched and stays published; the tap catches up at the next version rather than by rewriting a published tag.