app: :twitter_wall, version: "0.1." <> File.read!("BUILD.MD"), elixir: "~> 1.5”,
... ] end
end Reading build version number from a file % Append build number to version number in config {ok, File} = file:open("BUILD",[read]), {ok, BuildStr} = file:read(File,1024), file:close(File), io:format("App build number is: ~s, REBAR_PROFILE is: ~s~n", [BuildStr, os:getenv("REBAR_PROFILE", "undef")]), {value, RelxTup, _} = lists:keytake(relx, 1, CONFIG), {relx, Relx} = RelxTup, {value, ReleaseTup, _} = lists:keytake(release, 1, Relx), {release, Release, Opts} = ReleaseTup, {AppName, Ver} = Release, VerUpd = Ver ++ BuildStr, ReleaseUpd = {AppName, VerUpd}, ReleaseTupUpd = {release, ReleaseUpd, Opts}, RelxUpd = lists:keystore(release, 1, Relx, ReleaseTupUpd), RelxTupUpd = {relx, RelxUpd}, CONFIG_UPD = lists:keystore(relx, 1, CONFIG, RelxTupUpd), CONFIG_UPD. rebar.config.script {erl_opts, [debug_info]}. {deps, [ {cowboy, "2.7.0"},
... ]}. {relx, [{release, {year_progress_bot, "0.1."}, [year_progress_bot, sasl]},
... }. rebar.config mix.exs