Created
November 26, 2017 19:41
-
-
Save Virviil/34d81f3d795b8d6dff80ab8f98fb6f87 to your computer and use it in GitHub Desktop.
Set elixir project's version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_version(version) do | |
Agent.update(Mix.ProjectStack, fn state -> | |
%{stack: [%{config: config_keyword}]} = state | |
new_config_keyword = Keyword.put(config_keyword, :version, version) | |
Map.put(state, :stack, [%{config: new_config_keyword}]) | |
end) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment