Even with moving the version to a file, it still feels like it is more
trouble than it is worth. Not all version bumps are the same. I may want to:

1. Bump major
2. Bump minor
3. Bump tiny
4. Bump to any of the above and add a -dev suffix
5. Bump from -dev to -rc
6. Bump from -rc.x to -rc.x+1

And there is one very easy way to do this: open up the file where the
version is written, be it mix.exs or a separate file, and just change the
version. Of the whole release process, bumping the version is the *hardest*
part to automate because one API that considers all cases above will be
much harder to use than doing the change yourself.

Here are all saner and simpler to use alternatives:

1. Pass the version explicitly. Pros: it is explicit and you can check the
new version is more recent than the current one. Cons: you still need to
parse the file where the version is listed.

mix publish 0.5.0


2. Assume the version has already been changed and committed. Pros: IMO
that's the sanest approach because there are other things I need to do when
publishing a package besides bumping the version, such as versioning the
CHANGELOG and adding dates. You could still have a "mix publish" command
that would read the version and do the rest of the work:


git tag v0.5.0

git push --tags

mix hex.publish


Even though, don't expect such to be added to Elixir. It does too little
and is too opinionated.

*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JhKaaRfyT%2B3kbi5%3D75YMLobyOL0KSHw%2BDjtmV-eiEsRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to