| # Copyright 2021 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. |
| |
| # Bazel BUILD target for making fetcher.py available to the |
| # product_repository rule. |
| |
| load("@rules_fuchsia_pip_deps//:requirements.bzl", "requirement") |
| load("@rules_python//python:defs.bzl", "py_binary", "py_test") |
| |
| exports_files(["fetch.py"]) |
| |
| py_binary( |
| name = "update", |
| srcs = ["update.py"], |
| main = "update.py", |
| python_version = "PY3", |
| visibility = ["//visibility:public"], |
| deps = [ |
| requirement("json5"), |
| ], |
| ) |
| |
| py_test( |
| name = "update_test", |
| size = "small", |
| srcs = [ |
| "update_test.py", |
| ], |
| main = "update_test.py", |
| python_version = "PY3", |
| deps = [ |
| ":update", |
| ], |
| ) |
| |
| sh_test( |
| name = "update_golden_test", |
| size = "small", |
| srcs = ["update_golden_test.sh"], |
| data = [ |
| "example/local/artifact_groups.json", |
| "example/local/artifact_groups2.json", |
| "example/local/artifact_spec.json", |
| "example/local/artifact_lock.json", |
| # a py_binary which we invoke at run time |
| ":update", |
| ], |
| ) |