electric-sql / legacy-cli

ElectricSQL command line interface (CLI) tool.
https://electric-sql.com/docs
Apache License 2.0
10 stars 0 forks source link

mix: fix invalid version string. #20

Closed thruflo closed 1 year ago

thruflo commented 1 year ago

As per https://hexdocs.pm/elixir/Version.html, the mix.exs project :version string can't just be a hash, it needs to follow major.minor.patch[-pre][(.build)*].

N.b.: is there a need for the git_version() component of the version? Why was it introduced?

icehaunter commented 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

thruflo commented 1 year ago

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.

icehaunter commented 1 year ago

CI fixed without resorting to this. If you're having issues with local build, run git fetch --tags and it should work as-is