non Semantic Version `cat VERSION`
seadynamic8 opened this issue · 10 comments
Using Elixir mix, I get the following error:
** (Mix) The application poolboy specified a non Semantic Version cat VERSION
. Mix can only match the requirement ~> 1.2.1 against Semantic Versions, to match against any version, please use a regex as requirement
I think it is referring to this code: https://github.com/devinus/poolboy/blob/master/src/poolboy.app.src#L3
I know that this is not a Elixir library, but Ecto/postgrex on Elixir depends on it.
Is it possible to get a fix to this?
Do you have the rebar version that Mix installs, otherwise which version do you have? When rebar compiles the project it should generate a poolboy.app file with the correct version from the poolboy.app.src file.
Yes, I believe that's the version I have (the one mix uses). I'm on Windows, maybe rebar doesn't work with Windows to correctly build the app with the version file?
This is a poolboy bug. Rebar (Erlang build tool) allows users to inject custom code in their application files and poolboy is using this feature to read the VERSION from the filesystem using specific OS commands. It works on Linux but it is going to fail on Windows.
The solution here is basically to stop using echo cat VERSION
. @devinus, what do you propose? It is super important to get poolboy to nicely work on Windows.
I guess we're just going to have to hardcode the version for now?
Yes. Which places use the version? Are they many?
José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Lead Developer
Just the .app.src
. Unfortunately, my laptop got stolen on Friday and the earliest I can release the next version is on Monday.
Ouch, sorry to hear. No problem at all, thanks for looking into this!
ooh, that's unfortunate. Thanks for looking at the problem.
why not just use {version, git}
? rebar will automatically substitute it with the output of git describe --always --tags