blob: 4003b6686a97f440d103777ff965114b0df60776 [file] [log] [blame]
#!/usr/bin/env python
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import sys
import json
def main():
parser = argparse.ArgumentParser(description=("List all targets in the pushable available set"))
parser.add_argument('--build-dir', action='store', required=True)
args = parser.parse_args()
with open(os.path.join(args.build_dir, "available_packages.list")) as f:
data =
available_build_packages = set(data.split('\n'))
with open(os.path.join(args.build_dir, "amber-files", "repository", "targets.json")) as f:
data = json.load(f)
published_packages = set([s.split('/')[1] for s in data['signed']['targets'].keys()])
available_packages = published_packages & available_build_packages
for tgt in available_packages:
if __name__ == '__main__':