Mix: Swallow git error messages during version number handling.
Otherwise sometimes a 'fatal' message will be printed, confusing users.
This commit is contained in:
parent
0eb7464c10
commit
b5e3b1e58a
3
mix.exs
3
mix.exs
|
@ -157,7 +157,8 @@ defp aliases do
|
||||||
# * the mix environment if different than prod
|
# * the mix environment if different than prod
|
||||||
defp version(version) do
|
defp version(version) do
|
||||||
{git_tag, git_pre_release} =
|
{git_tag, git_pre_release} =
|
||||||
with {tag, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=0"]),
|
with {tag, 0} <-
|
||||||
|
System.cmd("git", ["describe", "--tags", "--abbrev=0"], stderr_to_stdout: true),
|
||||||
tag = String.trim(tag),
|
tag = String.trim(tag),
|
||||||
{describe, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=8"]),
|
{describe, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=8"]),
|
||||||
describe = String.trim(describe),
|
describe = String.trim(describe),
|
||||||
|
|
Loading…
Reference in New Issue