Skip to content

fix(scripts): make the cask bump run on Linux - #55

Merged
Periicles merged 3 commits into
mainfrom
fix/cask-bump-mktemp
Aug 31, 2026
Merged

fix(scripts): make the cask bump run on Linux#55
Periicles merged 3 commits into
mainfrom
fix/cask-bump-mktemp

Conversation

@Periicles

Copy link
Copy Markdown
Owner

Why

v0.3.1 published fine, then bump-cask died on its first line of real work:

mktemp: too few X's in template 'notchbar-dmg'

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 on ubuntu-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

  • Pass a complete template ($TMPDIR/notchbar-dmg.XXXXXX), which both implementations accept.
  • Add a cask-bump job to CI: on every pull request, on ubuntu-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 -n clean, 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.

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.
@Periicles Periicles self-assigned this Aug 31, 2026
@Periicles
Periicles merged commit d9dca25 into main Aug 31, 2026
4 checks passed
@Periicles
Periicles deleted the fix/cask-bump-mktemp branch August 31, 2026 09: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.

1 participant