Skip to content

Commit

Permalink
Merge pull request #175 from mattmoor/ease-import
Browse files Browse the repository at this point in the history
Tweak the manner in which we alias things.
  • Loading branch information
mattmoor authored Sep 27, 2017
2 parents 839a297 + 77ecfad commit 9dd92c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 49 deletions.
27 changes: 4 additions & 23 deletions docker/docker.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,20 @@
"""Rules for manipulation Docker images."""

load(
"//container:image.bzl",
"//container:container.bzl",
"container_push",
docker_build = "container_image",
docker_image = "container_image",
)
load(
"//container:bundle.bzl",
docker_bundle = "container_bundle",
)
load(
"//container:flatten.bzl",
docker_flatten = "container_flatten",
)
load(
"//container:import.bzl",
docker_image = "container_image",
docker_import = "container_import",
)
load(
"//container:pull.bzl",
docker_pull = "container_pull",
docker_repositories = "repositories",
)

# Expose the docker_push rule.
load("//container:push.bzl", "container_push")

def docker_push(*args, **kwargs):
if "format" in kwargs:
fail("Cannot override 'format' attribute on docker_push",
attr="format")
kwargs["format"] = "Docker"
container_push(*args, **kwargs)

# Backwards-compatibility alias.
load(
"//container:container.bzl",
docker_repositories = "repositories",
)
29 changes: 3 additions & 26 deletions oci/oci.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,16 @@
# limitations under the License.
"""Rules for manipulation OCI images."""

# Expose the oci_image rule.
load(
"//container:image.bzl",
oci_image = "container_image",
)

# Expose the oci_bundle rule.
load(
"//container:bundle.bzl",
"//container:container.bzl",
"container_push",
oci_bundle = "container_bundle",
)

# Expose the oci_flatten rule.
load(
"//container:flatten.bzl",
oci_flatten = "container_flatten",
)

# Expose the oci_import rule.
load(
"//container:import.bzl",
oci_image = "container_image",
oci_import = "container_import",
)

# Expose the oci_pull repository rule.
load(
"//container:pull.bzl",
oci_pull = "container_pull",
)

# Expose the oci_push rule.
load("//container:push.bzl", "container_push")

def oci_push(*args, **kwargs):
if "format" in kwargs:
fail("Cannot override 'format' attribute on oci_push",
Expand Down

0 comments on commit 9dd92c7

Please sign in to comment.