Created
July 12, 2011 04:23
-
-
Save tdx/1077389 to your computer and use it in GitHub Desktop.
Diff for get_reltool_release_info (pull request 90)
This file contains 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
%% Get release name and version from a reltool.config | |
-get_reltool_release_info(ReltoolFile) -> | |
- %% expect sys to be the first proplist in reltool.config | |
- case file:consult(ReltoolFile) of | |
- {ok, [{sys, Config}| _]} -> | |
- %% expect the first rel in the proplist to be the one you want | |
- {rel, Name, Ver, _} = proplists:lookup(rel, Config), | |
- {Name, Ver}; | |
- _ -> | |
- ?ABORT("Failed to parse ~s~n", [ReltoolFile]) | |
- end. | |
+get_reltool_release_info(ReltoolConfig) -> | |
+ %% expect the first rel in the proplist to be the one you want | |
+ {sys, Config} = get_sys_tuple(ReltoolConfig), | |
+ {rel, Name, Ver, _} = proplists:lookup(rel, Config), | |
+ {Name, Ver}. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment