mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-09 09:52:13 +00:00
mix.exs: Put template into one variable with ~s[]
This commit is contained in:
parent
99c2e8ed5c
commit
a17a9dcc4d
10
mix.exs
10
mix.exs
|
@ -337,12 +337,12 @@ defmodule Pleroma.Mixfile do
|
||||||
|
|
||||||
defp add_copyright(_) do
|
defp add_copyright(_) do
|
||||||
year = NaiveDateTime.utc_now().year
|
year = NaiveDateTime.utc_now().year
|
||||||
line1 = "# Pleroma: A lightweight social networking server\\n"
|
template = ~s[\
|
||||||
|
# Pleroma: A lightweight social networking server
|
||||||
|
# Copyright © 2017-#{year} Pleroma Authors <https://pleroma.social/>
|
||||||
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
line2 = "# Copyright © 2017-#{year} Pleroma Authors <https://pleroma.social/>\\n"
|
] |> String.replace("\n", "\\n")
|
||||||
|
|
||||||
line3 = "# SPDX-License-Identifier: AGPL-3.0-only\\n\\n"
|
|
||||||
template = line1 <> line2 <> line3
|
|
||||||
|
|
||||||
find = "find lib test priv -type f \\( -name '*.ex' -or -name '*.exs' \\) -exec "
|
find = "find lib test priv -type f \\( -name '*.ex' -or -name '*.exs' \\) -exec "
|
||||||
grep = "grep -L '# Copyright' {} \\; |"
|
grep = "grep -L '# Copyright' {} \\; |"
|
||||||
|
|
Loading…
Reference in a new issue