Skip to content

Commit

Permalink
Package API rules
Browse files Browse the repository at this point in the history
  • Loading branch information
shaldengeki committed Jul 31, 2024
1 parent e37474f commit b30b62c
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ark_nova_stats/api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")
load("//tools/build_rules:api_image.bzl", "api_image")
load("//tools/build_rules/api:defs.bzl", "api_image")

py_library(
name = "app",
Expand Down
2 changes: 1 addition & 1 deletion ark_nova_stats/api/migrations/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tools/build_rules/api/migrations:defs.bzl", "migrations")
load("//tools/build_rules/api:defs.bzl", migrations = "api_migrations")

migrations(
app_config = "//ark_nova_stats:config_py",
Expand Down
2 changes: 1 addition & 1 deletion fitbit_challenges/api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@py_deps//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library")
load("//tools/build_rules:api_image.bzl", "api_image")
load("//tools/build_rules/api:defs.bzl", "api_image")

py_library(
name = "api_lib",
Expand Down
2 changes: 1 addition & 1 deletion fitbit_challenges/api/migrations/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tools/build_rules/api/migrations:defs.bzl", "migrations")
load("//tools/build_rules/api:defs.bzl", migrations = "api_migrations")

migrations(
app_config = "//fitbit_challenges:config_py",
Expand Down
2 changes: 1 addition & 1 deletion home_api/api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@py_deps//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library")
load("//tools/build_rules:api_image.bzl", "api_image")
load("//tools/build_rules/api:defs.bzl", "api_image")

py_library(
name = "api_lib",
Expand Down
2 changes: 1 addition & 1 deletion home_api/api/migrations/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tools/build_rules/api/migrations:defs.bzl", "migrations")
load("//tools/build_rules/api:defs.bzl", migrations = "api_migrations")

migrations(
app_config = "//home_api:config_py",
Expand Down
2 changes: 1 addition & 1 deletion mc_manager/api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@py_deps//:requirements.bzl", "requirement")
load("//tools/build_rules:api_image.bzl", "api_image")
load("//tools/build_rules/api:defs.bzl", "api_image")

py_library(
name = "api_lib",
Expand Down
2 changes: 1 addition & 1 deletion mc_manager/api/migrations/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tools/build_rules/api/migrations:defs.bzl", "migrations")
load("//tools/build_rules/api:defs.bzl", migrations = "api_migrations")

migrations(
app_config = "//mc_manager:config_py",
Expand Down
2 changes: 1 addition & 1 deletion proto_registry/api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@py_deps//:requirements.bzl", "requirement")
load("@rules_python//python:defs.bzl", "py_library")
load("//tools/build_rules:api_image.bzl", "api_image")
load("//tools/build_rules/api:defs.bzl", "api_image")

py_library(
name = "api_lib",
Expand Down
2 changes: 1 addition & 1 deletion proto_registry/api/migrations/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tools/build_rules/api/migrations:defs.bzl", "migrations")
load("//tools/build_rules/api:defs.bzl", migrations = "api_migrations")

migrations(
app_config = "//proto_registry:config_py",
Expand Down
2 changes: 1 addition & 1 deletion skeleton/api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")
load("//tools/build_rules:api_image.bzl", "api_image")
load("//tools/build_rules/api:defs.bzl", "api_image")

py_library(
name = "app",
Expand Down
2 changes: 1 addition & 1 deletion skeleton/api/migrations/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//tools/build_rules/api/migrations:defs.bzl", "migrations")
load("//tools/build_rules/api:defs.bzl", migrations = "api_migrations")

migrations(
app_config = "//skeleton:config_py",
Expand Down
3 changes: 3 additions & 0 deletions tools/build_rules/api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exports_files([
"templates/__main__.py.tpl",
])
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ A macro used to define an API container image.

load("@rules_python//python:defs.bzl", "py_binary")
load("//tools/build_rules:cross_platform_image.bzl", "cross_platform_image")
load("//tools/build_rules:main_py.bzl", "main_py")
load("//tools/build_rules:py_layer.bzl", "py_oci_image")
load("//tools/build_rules/api:main_py.bzl", "main_py")

def api_image(
name,
Expand Down
11 changes: 11 additions & 0 deletions tools/build_rules/api/defs.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
defs.bzl: public interfaces for API rules.
You should import rules exposed here.
"""

load("//tools/build_rules/api:api_image.bzl", _api_image = "api_image")
load("//tools/build_rules/api/migrations:defs.bzl", _api_migrations = "migrations")

api_image = _api_image
api_migrations = _api_migrations
File renamed without changes.
File renamed without changes.

0 comments on commit b30b62c

Please sign in to comment.