1. 13 Apr, 2020 39 commits
  2. 12 Apr, 2020 1 commit
    • Anthony Fandrianto's avatar
      [cipd] Refactor CIPD template · 3d6123e3
      Anthony Fandrianto authored
      Currently, a CIPD staging directory is populated by copying specified
      `sources` into it, and producing a .yaml manifest which reflects the
      copied files.
      
      This change refactors the template to invoke a pytho script to do the
      above instead of in GN, using the `yaml` library to write the file data
      in the proper format.
      
      Also make the license filepath explicitly passed through sources.
      
      Renames "archive" -> "package" and "manifest" -> "package definition" to
      be consistent with CIPD semantics (crbug.com/1042819#c8).
      
      Finally, have the script emit a depfile for all files tracked by the
      .yaml manifest.
      
      This refactor is desirable, as we want to create CIPD packages with more
      complicated rules than simply "copy and include these files" (see
      crrev.com/c/1925446, which extends the functionality of the template to
      allow for the inclusion of directories). Wriiting yamls with a library
      reduces the error-proneness of trying to recreate yaml's format in pure
      GN.
      
      Also, emitting a depfile ensure that we track and rebuild if the CIPD
      package is modified.
      
      Currently the potential danger of this change is limited in scope to
      fuchsia, as they are the only users of the template. I've checked
      locally that the produced CIPD packages for fuchsia are identical prior
      to this change.
      
      Bug: fuchsia:41443
      Change-Id: If1b27d6a8fbbffdf767aaa4230bf7b527a553170
      Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135186
      Commit-Queue: Anthony Fandrianto <atyfto@google.com>
      Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
      Reviewed-by: default avatarKevin Marshall <kmarshall@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#758433}
      3d6123e3