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

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


      # Build an upgrade release from a specific version
      mix release --upgrade --upfrom=0.1.0

      # Build a specific release
      mix release --name=myapp

      # Build a release for a specific environment
      mix release --env=staging

      # Pass args to erlexec when running the release
      mix release --erl="-env TZ UTC"
