Quellcode durchsuchen

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.
Thales Macedo Garitezi vor 3 Jahren
Ursprung
Commit
a6e45be218
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      pkg-vsn.sh

+ 1 - 1
pkg-vsn.sh

@@ -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}}"