I understand I can influence the name of the release, but I don’t see how I can change the name of the .tar
, as it is #{name}-#{version}
. I can set version: ""
but then I end up with a tar called market_manager-
.
%Mix.Release{
name: :market_manager,
version: "",
path: "c:/Users/user/Documents/market_manager/_build/prod/rel/market_manager",
version_path: "c:/Users/user/Documents/market_manager/_build/prod/rel/market_manager/releases/2.1.5",
applications: %{
elixir: [
path: ~c"c:/Users/user/scoop/apps/elixir/current/bin/../lib/elixir",
otp_app?: false,
mode: :permanent,
...
],
...
},
boot_scripts: %{
start: [
kernel: :permanent,
parse_trans: :permanent,
phoenix: :permanent,
phoenix_html: :permanent,
phoenix_live_view: :permanent,
...
],
start_clean: [
kernel: :permanent,
phoenix: :none,
phoenix_html: :none,
...
]
},
erts_source: ~c"c:/Users/user/scoop/apps/erlang/26.1.1/erts-14.1",
erts_version: ~c"14.1",
config_providers: [
{Config.Reader,
[
path: {:system, "RELEASE_ROOT", "/releases/2.1.5/runtime.exs"},
env: :prod,
target: :host,
imports: :disabled
]}
],
options: [
reboot_system_after_config: false,
overwrite: false,
quiet: false,
strip_beams: true,
include_executables_for: [:windows]
],
overlays: [],
steps: [:tar]
}
I suppose I can cheat the system by updating the name
and version
of the app before release:
defp releases,
do: [
market_manager: [
applications: [
web_interface: :permanent,
runtime_tools: :permanent
],
steps: [:assemble, &rename_tar/1, :tar],
include_executables_for: [:windows]
]
]
defp rename_tar(release) do
%{release | version: "data", name: :application}
end
Which will result in a tar
called application-data
, but it honestly feels like cheating.
Is there another way to achieve the same without usurping the name
and version
fields?