mix crosswake. bump_template_version
(crosswake v0.2.0)
View Source
Maintainer task: increments the integer @template_version in
lib/mix/tasks/crosswake.gen.shell.ex AND recomputes and rewrites
@checked_in_hash in test/crosswake/proof/phase134_template_version_drift_test.exs.
Run this whenever any .eex shell template changes. Both edits happen atomically
in a single invocation — never bump the integer without rewriting the hash, or
vice versa (D-05, pitfall 7).
Usage
mix crosswake.bump_template_versionNo arguments are accepted.
How it works
- Reads
lib/mix/tasks/crosswake.gen.shell.ex, finds the@template_version Nline, and replaces it with@template_version N+1. - Recomputes the SHA-256 over the sorted
.eextemplate glob — exactly the same algorithm aslive_template_hash/0in the drift test (priv/templates/crosswake/shell/**/*.eex, sorted, concatenated, SHA-256, lowercase hex) so the hash matches byte-for-byte. - Reads
test/crosswake/proof/phase134_template_version_drift_test.exs, finds the@checked_in_hash "..."literal on its own line, and replaces the quoted value with the new hash.