function uploadList(files) {
  return Promise.all(
    files.map((file) =>
      upload(file)
        .then(({ uploadPath, output }) => {
          console.log(`Successfully uploaded: ${uploadPath}`) // eslint-disable-line no-console
          return output
        })
        .catch((err) => {
          console.log('Error uploading:', err.message || err) // eslint-disable-line no-console
          return Promise.reject(err)
        })
    )
  )
}
', '')}`
  const command = `gsutil -m cp -r -a public-read ${entityPath} gs://${uploadPath}`
  return runCommand(command).then(({ stdout, stderr }) =>
    stdout ? Promise.reject(stdout) : { output: stderr, uploadPath }
  )
}

/**
Upload list of files or folders to Google Cloud Storage
@param  {Array} files - List of files/folders to upload
@returns {Promise} Resolves with an array of upload results
@private