Orchestrates publishing multiple apps to Hex in topological order.
For each app (in dependency order):
- Backs up the original
mix.exs - Replaces
path:deps with their published Hex versions (~> X.Y) - Injects
package/0metadata if missing - Runs
mix hex.publish --yes - Restores the original
mix.exs(always, even on failure)
Summary
Functions
Executes the publish flow.
Plans the publish order and returns a list of levels with app info.
Restores backed-up mix.exs files.
Functions
Executes the publish flow.
Plans the publish order and returns a list of levels with app info.
Does not modify anything. Filters out apps whose local version is
already on Hex (status == :published), so publish is idempotent.
Returns a map with:
:levels— topological levels after filtering (only apps that need publishing):apps— publishable apps with cleaned internal deps:graph— dep graph:skipped— apps filtered out because they're already on Hex (or pre-release). Each entry is%{app: name, local: v, hex: v, reason: :already_published | :prerelease}.
Restores backed-up mix.exs files.