aboutsummaryrefslogtreecommitdiff
path: root/mix.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-08-06 15:22:20 +0200
committerlain <lain@soykaf.club>2020-08-06 15:22:20 +0200
commitbf95dfb240cff8c5a2f8a0930e5309a09ca00ba1 (patch)
tree3a0c81155e7ae38e27008a7c066e8bc03fb1b410 /mix.exs
parent532d6f94aea5d4f53e846b8b77296f80a9ae68a0 (diff)
parent10b0e55acffeeff5842421c12b3b26feb35336de (diff)
downloadpleroma-bf95dfb240cff8c5a2f8a0930e5309a09ca00ba1.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into frontend-bundles-downloads
Diffstat (limited to 'mix.exs')
-rw-r--r--mix.exs9
1 files changed, 5 insertions, 4 deletions
diff --git a/mix.exs b/mix.exs
index 0e723c15f..aab833c5e 100644
--- a/mix.exs
+++ b/mix.exs
@@ -214,7 +214,8 @@ defmodule Pleroma.Mixfile do
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"],
- docs: ["pleroma.docs", "docs"]
+ docs: ["pleroma.docs", "docs"],
+ analyze: ["credo --strict --only=warnings,todo,fixme,consistency,readability"]
]
end
@@ -228,10 +229,10 @@ defmodule Pleroma.Mixfile do
defp version(version) do
identifier_filter = ~r/[^0-9a-z\-]+/i
- {_cmdgit, cmdgit_err} = System.cmd("sh", ["-c", "command -v git"])
+ git_available? = match?({_output, 0}, System.cmd("sh", ["-c", "command -v git"]))
git_pre_release =
- if cmdgit_err == 0 do
+ if git_available? do
{tag, tag_err} =
System.cmd("git", ["describe", "--tags", "--abbrev=0"], stderr_to_stdout: true)
@@ -257,7 +258,7 @@ defmodule Pleroma.Mixfile do
# Branch name as pre-release version component, denoted with a dot
branch_name =
- with 0 <- cmdgit_err,
+ with true <- git_available?,
{branch_name, 0} <- System.cmd("git", ["rev-parse", "--abbrev-ref", "HEAD"]),
branch_name <- String.trim(branch_name),
branch_name <- System.get_env("PLEROMA_BUILD_BRANCH") || branch_name,