diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2022-03-17 21:21:59 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2022-03-17 21:21:59 +0000 |
commit | 2db640632b81fb435456e4b3cc79901d02d7135c (patch) | |
tree | 1bee92c355020b639a13e58f48dedae4c1167fff | |
parent | 4458db320160ff0a5e6e7e017e72cc84c933e67c (diff) | |
parent | 56197192bb03058fda375767cc8ffc35c0c9eed0 (diff) | |
download | pleroma-2db640632b81fb435456e4b3cc79901d02d7135c.tar.gz |
Merge branch 'bugfix/mix-dotgit' into 'develop'
mix: Check `.git` presence
See merge request pleroma/pleroma!3638
-rw-r--r-- | mix.exs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -243,9 +243,10 @@ defmodule Pleroma.Mixfile do identifier_filter = ~r/[^0-9a-z\-]+/i git_available? = match?({_output, 0}, System.cmd("sh", ["-c", "command -v git"])) + dotgit_present? = File.exists?(".git") git_pre_release = - if git_available? do + if git_available? and dotgit_present? do {tag, tag_err} = System.cmd("git", ["describe", "--tags", "--abbrev=0"], stderr_to_stdout: true) @@ -272,6 +273,7 @@ defmodule Pleroma.Mixfile do # Branch name as pre-release version component, denoted with a dot branch_name = with true <- git_available?, + true <- dotgit_present?, {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, |