                nil -> config
                o   -> %{config | :erl_opts => o}
              end
+    config = %{config |
+               :is_upgrade => Keyword.fetch!(opts, :is_upgrade),
+               :upgrade_from => Keyword.fetch!(opts, :upgrade_from)}
     no_tar? = Keyword.get(opts, :no_tar)
 
     # build release

    [verbosity: verbosity,
     dev_mode: Keyword.get(overrides, :dev),
     erl_opts: Keyword.get(overrides, :erl),
     no_tar:   Keyword.get(overrides, :no_tar, false)]
  end
end


  defp parse_args(argv) do
    switches = [silent: :boolean, quiet: :boolean, verbose: :boolean,
                dev: :boolean, erl: :string, no_tar: :boolean,
                upgrade: :boolean, upfrom: :string]
    {overrides, _} = OptionParser.parse!(argv, switches)
    verbosity = :normal
    verbosity = cond do
