The release-facing half of folding relup generation into assembly (ausimian/forecastle, "Generate the relup during assembly").
Castle.customize/1 already owns step arrangement — it puts Forecastle's steps around :assemble and defaults missing steps to [:assemble, :tar]. It grows an option naming one or more baselines:
my_app: fn ->
[include_executables_for: [:unix]]
|> Castle.customize(upgrade_from: ["tar:artifacts/my_app-1.0.0.tar.gz"])
end
When set, the relup-generating step is inserted between post_assemble and :tar, and the double build disappears.
Notes
- Baseline specs are the shared grammar (
rel:, tar:, ref:), resolved by Forecastle.
- Dynamic values are already available without new machinery: the release definition is a
fn -> thunk, so mix.exs can read the list from the environment or compute it.
- One accepted tension. With
ref:, an ordinary mix release triggers a minutes-long build of a previous version as a side effect. It is opt-in and tar: is fast, so it stands — but it is what would later justify a mix castle.baseline <spec> task so CI can run the resolution as its own cacheable stage.
Acceptance
upgrade_from: with one and with several baselines.
- Omitting it leaves assembly exactly as it is today.
- Documented in the README's "Appups and relups" section, which currently prescribes the double build without saying so.
Rationale: design/upgrade-tooling.md §D5.
The release-facing half of folding relup generation into assembly (ausimian/forecastle, "Generate the relup during assembly").
Castle.customize/1already owns step arrangement — it puts Forecastle's steps around:assembleand defaults missing steps to[:assemble, :tar]. It grows an option naming one or more baselines:When set, the relup-generating step is inserted between
post_assembleand:tar, and the double build disappears.Notes
rel:,tar:,ref:), resolved by Forecastle.fn ->thunk, somix.exscan read the list from the environment or compute it.ref:, an ordinarymix releasetriggers a minutes-long build of a previous version as a side effect. It is opt-in andtar:is fast, so it stands — but it is what would later justify amix castle.baseline <spec>task so CI can run the resolution as its own cacheable stage.Acceptance
upgrade_from:with one and with several baselines.Rationale:
design/upgrade-tooling.md§D5.