Commit 831046f
Ensure ERTS is not copied into release (#9752)
The default behaviour when starting a new mix project is to
`include_erts: true`.
If at some point you choose to `include_erts: false`, but have the ERTS
artifact hanging around from previous builds, it gets included in future
builds, therefore rendering `include_erts: false` broken when running on
systems that have built with `include_erts: true` for the same
environment.
`make_tar/1` currently always tries to include the ERTS artifact into
the archive, regardless of our `include_erts` configuration. this fails
in 1.9.4 if no previous artifact is present, and seems to be worked
around in the current implementation by simply ignoring source
directories that don't exist.
This adds a regression test for the behaviour by "simulating" an ERTS
leftover from a previous build.
This also adds logic to not try to include ERTS into archives in the
first place when our release is configured with `include_erts: false`.1 parent 6c44fea commit 831046f
File tree
2 files changed
+36
-2
lines changed- lib/mix
- lib/mix/tasks
- test/mix/tasks
2 files changed
+36
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1075 | 1075 | | |
1076 | 1076 | | |
1077 | 1077 | | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
1078 | 1084 | | |
1079 | 1085 | | |
1080 | 1086 | | |
1081 | 1087 | | |
1082 | 1088 | | |
1083 | 1089 | | |
1084 | | - | |
1085 | | - | |
| 1090 | + | |
| 1091 | + | |
1086 | 1092 | | |
1087 | 1093 | | |
1088 | 1094 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
211 | 239 | | |
212 | 240 | | |
213 | 241 | | |
| |||
0 commit comments