- tag = String.trim(tag),
- {describe, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=8"]),
- describe = String.trim(describe),
- ahead <- String.replace(describe, tag, ""),
- ahead <- String.trim_leading(ahead, "-") do
- {String.replace_prefix(tag, "v", ""), if(ahead != "", do: String.trim(ahead))}
+ {describe, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=8"]) do
+ describe
+ |> String.trim()
+ |> String.replace(String.trim(tag), "")
+ |> String.trim_leading("-")
+ |> String.trim()