tfiedlerdejanze / expublish

Automates semantic release versioning and best practices for elixir packages.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Be more flexible about version update

tfiedlerdejanze opened this issue · comments

Investigate options which would allow users to specify the the update process for a custom version setup. To keep setup efforts to a minimum, Expublish currently expects the package version to be in its default location in the package/0 function of mix.exs:

def package do
  [
    version: "1.0.0",
    # ...
  ]
end

There are libraries that don't do this, but rather specify the current version in a module attribute @version inside mix.exs, sometimes the current version is read from another file or environment variables. Expublish would ideally be agnostic to where a maintainer decides to set the final package version.

Ideas:

  • allow users to define and configure a small set of functions that replace update the version of the package and write to disk. Those would then be used instead of the default Expublish.Semver functions.
  • allow users to overwrite the default replace pattern used in semver (that would work for simple module attributes, but not if the version is read from an external source)

Happy to receive some requirements and ideas for how to solve this nicely!