Page MenuHomePhorge

No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None
diff --git a/mix.exs b/mix.exs
index 4edd91b..96aa744 100644
--- a/mix.exs
+++ b/mix.exs
@@ -1,44 +1,59 @@
defmodule Linkify.Mixfile do
use Mix.Project
@version "0.4.1"
def project do
[
app: :linkify,
version: @version,
elixir: "~> 1.8",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
+ aliases: aliases(),
deps: deps(),
docs: [extras: ["README.md"]],
package: package(),
name: "Linkify",
description: """
Linkify is a basic package for turning website names into links.
"""
]
end
# Configuration for the OTP application
def application do
# Specify extra applications you'll use from Erlang/Elixir
[extra_applications: [:logger]]
end
# Dependencies can be Hex packages:
defp deps do
[
{:ex_doc, "~> 0.20", only: :dev, runtime: false},
{:credo, "~> 1.5", only: [:dev, :test], runtime: false}
]
end
defp package do
[
licenses: ["MIT"],
links: %{"GitLab" => "https://git.pleroma.social/pleroma/elixir-libraries/linkify"},
files: ~w(lib priv README.md mix.exs LICENSE)
]
end
+
+ defp aliases do
+ [
+ "update.tlds": &update_tlds/1
+ ]
+ end
+
+ defp update_tlds(_) do
+ :os.cmd(
+ String.to_charlist(
+ "curl https://data.iana.org/TLD/tlds-alpha-by-domain.txt | tr '[:upper:]' '[:lower:]' | tail -n +2 > priv/tlds.txt"
+ )
+ )
+ end
end

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 26, 9:52 PM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40468
Default Alt Text
(1 KB)

Event Timeline