pre-upload: rewrite tag logic to avoid filter()

We've banned the filter() builtin, so rewrite the logic to avoid it.
This makes the check slightly more strict in that we only allow tags
with the correct case, but that should be fine.

BUG=chromium:982868
TEST=unittests pass

Change-Id: Ia10dff1ac2027b77e435c1d1155cefdf74031b94
Reviewed-on: https://chromium-review.googlesource.com/1729850
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jack Neus <jackneus@google.com>
2 files changed