projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
99c2e8e
)
mix.exs: Put template into one variable with ~s[]
author
Haelwenn (lanodan) Monnier
<contact@hacktivis.me>
Sat, 16 Jan 2021 01:17:24 +0000
(
02:17
+0100)
committer
Haelwenn (lanodan) Monnier
<contact@hacktivis.me>
Sat, 16 Jan 2021 01:42:52 +0000
(
02:42
+0100)
mix.exs
patch
|
blob
|
history
diff --git
a/mix.exs
b/mix.exs
index 5404a5c11fe46a6f14a20f61c643c1e8f73780f4..79d9783c42fca63103ebbbb7b06e95eb04554801 100644
(file)
--- a/
mix.exs
+++ b/
mix.exs
@@
-337,12
+337,12
@@
defmodule Pleroma.Mixfile do
defp add_copyright(_) do
year = NaiveDateTime.utc_now().year
defp add_copyright(_) do
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"
-
- line3 = "# SPDX-License-Identifier: AGPL-3.0-only\\n\\n"
- template = line1 <> line2 <> line3
+] |> String.replace("\n", "\\n")
find = "find lib test priv -type f \\( -name '*.ex' -or -name '*.exs' \\) -exec "
grep = "grep -L '# Copyright' {} \\; |"
find = "find lib test priv -type f \\( -name '*.ex' -or -name '*.exs' \\) -exec "
grep = "grep -L '# Copyright' {} \\; |"