chore(mix): add prefix to pre-release version to please elixir version parser
Since upstream refuses to fix this issue: https://github.com/elixir-lang/elixir/issues/12000 On rare occasions, our pre-release version, which is the prefix of the git hash, might consist only of digits. Even more rarely, it might start with a `0`. When that happens, Elixir will refuse to parse that as a valid pre-release version (it wants it to be an integer without a leading 0). To prevent that, we will always prepend a "g" to the pre-release version, ensuring it's never a valid number.
This commit is contained in:
parent
a4f093675d
commit
a6e45be218
|
@ -101,7 +101,7 @@ if [ "$GIT_EXACT_VSN" != '' ]; then
|
|||
fi
|
||||
SUFFIX=''
|
||||
else
|
||||
SUFFIX="-$(git rev-parse HEAD | cut -b1-8)"
|
||||
SUFFIX="-g$(git rev-parse HEAD | cut -b1-8)"
|
||||
fi
|
||||
|
||||
PKG_VSN="${PKG_VSN:-${RELEASE}${SUFFIX}}"
|
||||
|
|
Loading…
Reference in New Issue