Skip to content

Commit 7a3d6ec

Browse files
author
José Valim
committed
Remove timestamps from release, closes #9127
1 parent 9b2e789 commit 7a3d6ec

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

lib/elixir/lib/config/provider.ex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,7 @@ defmodule Config.Provider do
220220
end
221221

222222
defp write_config!(config, path) do
223-
{date, time} = :erlang.localtime()
224-
args = [date, time, config]
225-
contents = :io_lib.format("%% coding: utf-8~n%% config generated at ~p ~p~n~p.~n", args)
223+
contents = :io_lib.format("%% coding: utf-8~n~p.~n", [config])
226224

227225
case File.write(path, contents) do
228226
:ok ->

lib/mix/lib/mix/release.ex

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,8 @@ defmodule Mix.Release do
318318
{sys_config, runtime?} = merge_provider_config(release, sys_config, config_provider_path)
319319
path = Path.join(release.version_path, "sys.config")
320320

321-
{date, time} = :erlang.localtime()
322-
args = [runtime?, date, time, sys_config]
323-
format = "%% coding: utf-8~n%% RUNTIME_CONFIG=~s~n%% config generated at ~p ~p~n~p.~n"
321+
args = [runtime?, sys_config]
322+
format = "%% coding: utf-8~n%% RUNTIME_CONFIG=~s~n~p.~n"
324323
File.mkdir_p!(Path.dirname(path))
325324
File.write!(path, :io_lib.format(format, args))
326325

@@ -407,7 +406,7 @@ defmodule Mix.Release do
407406
:ok | {:error, String.t()}
408407
def make_boot_script(release, path, modes, prepend_paths \\ []) do
409408
with {:ok, rel_spec} <- build_release_spec(release, modes) do
410-
File.write!(path <> ".rel", consultable("rel", rel_spec))
409+
File.write!(path <> ".rel", consultable(rel_spec))
411410

412411
sys_path = String.to_charlist(path)
413412

@@ -430,7 +429,7 @@ defmodule Mix.Release do
430429
|> prepend_paths_to_script(prepend_paths)
431430

432431
script = {:script, rel_info, instructions}
433-
File.write!(script_path, consultable("script", script))
432+
File.write!(script_path, consultable(script))
434433
:ok = :systools.script2boot(sys_path)
435434

436435
{:error, module, info} ->
@@ -546,10 +545,8 @@ defmodule Mix.Release do
546545
end)
547546
end
548547

549-
defp consultable(kind, term) do
550-
{date, time} = :erlang.localtime()
551-
args = [kind, date, time, term]
552-
:io_lib.format("%% coding: utf-8~n%% ~ts generated at ~p ~p~n~p.~n", args)
548+
defp consultable(term) do
549+
:io_lib.format("%% coding: utf-8~n~p.~n", [term])
553550
end
554551

555552
@doc """

0 commit comments

Comments
 (0)