code: def publish_results(self, dist_dir, use_basename_prefix, vt, bundle_dir, archivepath, id, archive_ext):
      
      # TODO (from mateor) move distdir management somewhere more general purpose.
      name = vt.target.basename if use_basename_prefix else id
      bundle_copy = os.path.join(dist_dir, '{}-bundle'.format(name))
      absolute_symlink(bundle_dir, bundle_copy)
      self.context.log.info(
        'created bundle copy {}'.format(os.path.relpath(bundle_copy, get_buildroot())))
  
      if archivepath:
        ext = archive.archive_extensions.get(archive_ext, archive_ext)
        archive_copy = os.path.join(dist_dir,'{}.{}'.format(name, ext))
        safe_mkdir_for(archive_copy)  # Ensure parent dir exists
        atomic_copy(archivepath, archive_copy)
        self.context.log.info(
          'created archive copy {}'.format(os.path.relpath(archive_copy, get_buildroot())))
docs: Publish a copy of the bundle and archive from the results dir in dist.