From 7fb900ad853c0442d4a5f3066fe840600acc85cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Gonz=C3=A1lez?= Date: Sat, 30 Dec 2023 15:57:58 +0100 Subject: [PATCH] Make formatter happy by splitting lines The generated mix.exs were failing the format step in CI because the lines where too long, by splitting the commands in different lines the formatter will be ok with it. --- installer/templates/phx_single/mix.exs | 4 +++- installer/templates/phx_umbrella/apps/app_name_web/mix.exs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/installer/templates/phx_single/mix.exs b/installer/templates/phx_single/mix.exs index ae64b2bdc2..d8aeed2498 100644 --- a/installer/templates/phx_single/mix.exs +++ b/installer/templates/phx_single/mix.exs @@ -78,7 +78,9 @@ defmodule <%= @app_module %>.MixProject do test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"]<% end %><%= if @asset_builders != [] do %>, "assets.setup": <%= inspect Enum.map(@asset_builders, &"#{&1}.install --if-missing") %>, "assets.build": <%= inspect Enum.map(@asset_builders, &"#{&1} #{@app_name}") %>, - "assets.deploy": <%= inspect Enum.map(@asset_builders, &"#{&1} #{@app_name} --minify") ++ ["phx.digest"] %><% end %> + "assets.deploy": [ +<%= Enum.map(@asset_builders, &" \"#{&1} #{@app_name} --minify\",\n") ++ [" \"phx.digest\""] %> + ]<% end %> ] end end diff --git a/installer/templates/phx_umbrella/apps/app_name_web/mix.exs b/installer/templates/phx_umbrella/apps/app_name_web/mix.exs index 7e418c324c..780ea7a715 100644 --- a/installer/templates/phx_umbrella/apps/app_name_web/mix.exs +++ b/installer/templates/phx_umbrella/apps/app_name_web/mix.exs @@ -69,7 +69,9 @@ defmodule <%= @web_namespace %>.MixProject do test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"]<% end %><%= if @asset_builders != [] do %>, "assets.setup": <%= inspect Enum.map(@asset_builders, &"#{&1}.install --if-missing") %>, "assets.build": <%= inspect Enum.map(@asset_builders, &"#{&1} #{@web_app_name}") %>, - "assets.deploy": <%= inspect Enum.map(@asset_builders, &"#{&1} #{@web_app_name} --minify") ++ ["phx.digest"] %><% end %> + "assets.deploy": [ +<%= Enum.map(@asset_builders, &" \"#{&1} #{@web_app_name} --minify\",\n") ++ [" \"phx.digest\""] %> + ]<% end %> ] end end