aboutsummaryrefslogtreecommitdiffstats
path: root/src/rcl_release.erl
diff options
context:
space:
mode:
authorTristan Sloughter <[email protected]>2013-02-07 04:57:36 -0800
committerTristan Sloughter <[email protected]>2013-02-07 04:57:36 -0800
commit6734e9ec4e0dd4c0678d10e8b8e48552ffb4e995 (patch)
tree93feb4e317d35d9d69443551b83175d21a0a0808 /src/rcl_release.erl
parent60b074edbb09b43618febdf8eb50a330db2aa677 (diff)
parent35040be995d9b2f1b3b601e69a998156145e1b35 (diff)
downloadrelx-6734e9ec4e0dd4c0678d10e8b8e48552ffb4e995.tar.gz
relx-6734e9ec4e0dd4c0678d10e8b8e48552ffb4e995.tar.bz2
relx-6734e9ec4e0dd4c0678d10e8b8e48552ffb4e995.zip
Merge pull request #27 from ericbmerritt/next
lots of bug fixes
Diffstat (limited to 'src/rcl_release.erl')
-rw-r--r--src/rcl_release.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rcl_release.erl b/src/rcl_release.erl
index ea20f1f..97465d0 100644
--- a/src/rcl_release.erl
+++ b/src/rcl_release.erl
@@ -89,7 +89,7 @@
%%============================================================================
-spec new(atom(), string()) -> t().
new(ReleaseName, ReleaseVsn) ->
- #release_t{name=ReleaseName, vsn=ReleaseVsn,
+ #release_t{name=to_atom(ReleaseName), vsn=ReleaseVsn,
annotations=ec_dictionary:new(ec_dict)}.
-spec name(t()) -> atom().
@@ -170,7 +170,7 @@ format(Release) ->
format(Indent, #release_t{name=Name, vsn=Vsn, erts=ErtsVsn, realized=Realized,
goals = Goals, applications=Apps}) ->
BaseIndent = rcl_util:indent(Indent),
- [BaseIndent, "release: ", erlang:atom_to_list(Name), "-", Vsn, "\n",
+ [BaseIndent, "release: ", rcl_util:to_string(Name), "-", Vsn, "\n",
rcl_util:indent(Indent + 1), " erts-", ErtsVsn,
", realized = ", erlang:atom_to_list(Realized), "\n",
BaseIndent, "goals: \n",
@@ -380,3 +380,10 @@ parse_version({AppName, Version, Constraint0, Constraint1})
{AppName, rcl_depsolver:parse_version(Version), Constraint1, Constraint0};
parse_version(Constraint) ->
Constraint.
+
+to_atom(RelName)
+ when erlang:is_list(RelName) ->
+ erlang:list_to_atom(RelName);
+to_atom(Else)
+ when erlang:is_atom(Else) ->
+ Else.