Skip to content

Instantly share code, notes, and snippets.

@tdx
Created July 12, 2011 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdx/1077389 to your computer and use it in GitHub Desktop.
Save tdx/1077389 to your computer and use it in GitHub Desktop.
Diff for get_reltool_release_info (pull request 90)
%% 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