mix phoenix_kit.release_check (phoenix_kit v1.7.165)

Copy Markdown View Source

Asserts release-metadata consistency before publishing to Hex.

Catches the class of mistakes that precommit/quality.ci cannot see — version/CHANGELOG/migration drift and unsafe git state — and exits non-zero on any failure so it can gate mix hex.publish. It is the semantic core of the mix prerelease alias and runs without a database.

Usage

$ mix phoenix_kit.release_check
$ mix phoenix_kit.release_check --allow-dirty --allow-branch

Options

  • --allow-dirty — downgrade the "working tree clean" check to a warning
  • --allow-branch — downgrade the "on main branch" check to a warning

Checks Performed

  1. CHANGELOG Heading — top ## X.Y.Z entry matches mix.exs @version (and is a real version, not "Unreleased").
  2. CHANGELOG Body — that entry has at least one content line.
  3. Migration Version SyncMigrations.Postgres.current_version/0 equals the highest vNNN.ex migration file on disk.
  4. Git Tree Clean — no uncommitted changes (--allow-dirty to warn).
  5. Git Branch — on main (--allow-branch to warn).
  6. Tag Collision — tag v<version> does not already exist (publish- before-tag means a pre-existing tag signals a double release).