[gcs_mirror] Add support for URLs ending with ".tgz".

This was necessary to mirror https://binaries.cockroachdb.com/cockroach-v21.1.9.linux-amd64.tgz in https://skia-review.googlesource.com/c/buildbot/+/546543.

Bug: skia:13293
Change-Id: Ib6d5db6864bd82f51321a44d5f15410d37d92ff7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/546541
Auto-Submit: Leandro Lovisolo <lovisolo@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Leandro Lovisolo 2022-06-03 00:32:08 +00:00 committed by SkCQ
parent b9be86b038
commit 6a00ee05ff

View File

@ -137,7 +137,7 @@ func processOne(workDir, url, hash string) error {
return skerr.Wrapf(cmd.Run(), "uploading %s to GCS", tmpFile)
}
var supportedSuffixes = []string{".tar.gz", ".tar.xz", ".deb", ".zip"}
var supportedSuffixes = []string{".tar.gz", ".tgz", ".tar.xz", ".deb", ".zip"}
// getSuffix returns the filetype suffix of the file if it is in the list of supported suffixes.
// Otherwise, it returns empty string.