X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=mix.exs;h=11fdb16703bbf543508034199899438b03652d84;hb=677abbf0ee8d44f88e40f21526c401eb4ed8cc05;hp=63142dee768c8891c4f3501675069e89b6409cf8;hpb=2299bfe4c19697e7c0250e052d3496533595c58b;p=akkoma diff --git a/mix.exs b/mix.exs index 63142dee7..11fdb1670 100644 --- a/mix.exs +++ b/mix.exs @@ -127,7 +127,7 @@ defmodule Pleroma.Mixfile do {:pbkdf2_elixir, "~> 1.2"}, {:bcrypt_elixir, "~> 2.2"}, {:trailing_format_plug, "~> 0.0.7"}, - {:fast_sanitize, "~> 0.1"}, + {:fast_sanitize, "~> 0.2.0"}, {:html_entities, "~> 0.5", override: true}, {:phoenix_html, "~> 2.14"}, {:calendar, "~> 1.0"}, @@ -229,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) @@ -258,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,