Closed thruflo closed 1 year ago
Hey, this git_version()
"hook" was introduced by me and not Garry. The reason for this is that this version is actually being printed in the released binary when doing e.g. electric help
. I didn't want it stuck on 0.1.0
forever, and rather follow our actual semver. If you don't want version
to be a hash, we can reformat the git-generated version a little, but let's not just prepend stuff. Also, why is it a hash at all? It takes version from the latest parent tag, so for me it's 0.1.0-2-<sha>
and not a pure sha
I think (which is what I did) that using the hash in a compliant way in the pre
or build
part can work. We have to start with major.minor.patch
server numbers to make it compliant.
CI fixed without resorting to this. If you're having issues with local build, run git fetch --tags
and it should work as-is
As per https://hexdocs.pm/elixir/Version.html, the mix.exs project
:version
string can't just be a hash, it needs to followmajor.minor.patch[-pre][(.build)*]
.N.b.: is there a need for the
git_version()
component of the version? Why was it introduced?