Commit fc35575
fix(build): stop shipping every previous release inside the artifact
`mix release --overwrite` overwrites the current version's files and leaves every
earlier one exactly where it is — `releases/<old>` and `lib/<app>-<old>` both
accumulate in the output tree. Both build scripts then copy that tree wholesale
into the artifact, so the artifact carried every version ever built on that
machine.
The 0.4.0 bump made it visible: the Windows ZIP went from 166.2 MB to 230.1 MB,
because `lib/elixir_torrent_web_ui-0.3.0` was still there at 194.8 MB — larger
than 0.4.0 itself, having accumulated digested asset generations across builds.
The macOS bundle was worse in kind if not in bytes: the 0.4.0 app I installed
carried 0.2.0 and 0.3.0 alongside it, plus `elixir_torrent-0.6.0` next to the
current Engine.
That is not only dead weight. It means users received compiled code from versions
we did not intend to ship, including a stale copy of the Engine, and the artifact
grew monotonically on any machine that built more than once. A fresh CI checkout
has only one version in `_build`, which is why neither CI nor the checksums ever
showed it.
Both scripts now remove the release output directory before `mix release`, so the
tree that gets copied contains exactly the version being built.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 1e193e1 commit fc35575
2 files changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
143 | 149 | | |
144 | 150 | | |
145 | | - | |
146 | | - | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| |||
0 commit comments