1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-17 18:49:15 +00:00

version string: force git abbrev size to 8 chars

Fixes #389

Older git versions defaults to 7 chars.
This commit is contained in:
href 2018-11-24 14:38:34 +01:00
parent 675653ceb7
commit f70b20e499
No known key found for this signature in database
GPG key ID: EE8296C1A152C325

View file

@ -95,7 +95,7 @@ defp version(version) do
{git_tag, git_pre_release} =
with {tag, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=0"]),
tag = String.trim(tag),
{describe, 0} <- System.cmd("git", ["describe", "--tags"]),
{describe, 0} <- System.cmd("git", ["describe", "--tags", "--abbrev=8"]),
describe = String.trim(describe),
ahead <- String.replace(describe, tag, "") do
{String.replace_prefix(tag, "v", ""), if(ahead != "", do: String.trim(ahead))}