       %{
         target: target,
         version: version,
+        nerves_version: Database.get({target, version, :nerves_version}),
         nerves_system_br_version: nerves_system_br_version,
         linux_version: Database.get({target, version, :linux_version}),
         buildroot_version: Database.get({:br, nerves_system_br_version, :buildroot_version}),

        for version <- versions do
          put(
            {target, version, :nerves_system_br_version},
            Repo.get_nerves_system_br_versions_for_target(target, version)
          )

          put(

      end
    end

    def get_nerves_system_br_version_for_target(target, version) do
      cd = "#{@download_dir}/nerves_system_#{target}"

      cmd =
        "cd #{cd} && git checkout v#{version} > /dev/null 2>&1 && grep :nerves_system_br, mix.exs"

      case System.shell(cmd) do
        {result, 0} ->
          captures =
            Regex.named_captures(
              ~r/:nerves_system_br, "(?<nerves_system_br_version>.*)"/i,
              result
            )

          captures["nerves_system_br_version"]

        _ ->
          nil
      end
    end

    def get_nerves_version_for_target(target, version) do
      cd = "#{@download_dir}/nerves_system_#{target}"
      cmd = "cd #{cd} && git checkout v#{version} > /dev/null 2>&1 && grep :nerves, mix.exs"

      case System.shell(cmd) do
        {result, 0} ->
          captures =
            Regex.named_captures(
              ~r/:nerves, "(?<nerves_version>.*)"/i,
              result
            )

          captures["nerves_version"]

        _ ->
          nil
