From f925607afb03d1fc9400127ccc5ca12991a2a225 Mon Sep 17 00:00:00 2001 From: Kris Foster Date: Mon, 13 Jan 2025 12:53:36 +0000 Subject: [PATCH 1/2] prep for bcr pt2 --- MODULE.bazel | 9 +++++++++ WORKSPACE | 23 ---------------------- examples/MODULE.bazel | 7 +++++++ examples/WORKSPACE | 26 ------------------------- repositories.bzl | 45 ------------------------------------------- 5 files changed, 16 insertions(+), 94 deletions(-) delete mode 100644 WORKSPACE delete mode 100644 examples/WORKSPACE delete mode 100644 repositories.bzl diff --git a/MODULE.bazel b/MODULE.bazel index 14e271e..e240deb 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -13,6 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +module( + name = "rules_docker_compose_test", + version = "1.0.0", +) + bazel_dep(name = "rules_pkg", version = "0.10.1") bazel_dep(name = "rules_oci", version = "2.2.0") bazel_dep(name = "rules_go", version = "0.50.1") + +repo_absolute_path = use_repo_rule("//:setup.bzl", "repo_absolute_path") + +repo_absolute_path(name = "repo_absolute_path") diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index 4258ef6..0000000 --- a/WORKSPACE +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2023, Salesforce, Inc. -# SPDX-License-Identifier: Apache-2 - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -workspace(name = "rules_docker_compose_test") - -load("//:repositories.bzl", "rules_docker_compose_test_repositories") -rules_docker_compose_test_repositories() - -load("@//:setup.bzl", "rules_docker_compose_test_dependencies", "repo_absolute_path") -rules_docker_compose_test_dependencies() -repo_absolute_path(name="repo_absolute_path") diff --git a/examples/MODULE.bazel b/examples/MODULE.bazel index e3245db..e7790fd 100644 --- a/examples/MODULE.bazel +++ b/examples/MODULE.bazel @@ -17,6 +17,13 @@ bazel_dep(name = "rules_oci", version = "2.2.0") bazel_dep(name = "platforms", version = "0.0.10") bazel_dep(name = "rules_jvm_external", version = "6.2") bazel_dep(name = "rules_go", version = "0.50.1") +bazel_dep(name = "rules_docker_compose_test", version = "1.0.0") +bazel_dep(name = "rules_pkg", version = "0.10.1") + +local_path_override( + module_name = "rules_docker_compose_test", + path = "..", +) oci = use_extension("@rules_oci//oci:extensions.bzl", "oci") oci.pull( diff --git a/examples/WORKSPACE b/examples/WORKSPACE deleted file mode 100644 index 2adef29..0000000 --- a/examples/WORKSPACE +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (c) 2023, Salesforce, Inc. -# SPDX-License-Identifier: Apache-2 - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -local_repository( - name="rules_docker_compose_test", - path= "..", -) - -load("@rules_docker_compose_test//:repositories.bzl", "rules_docker_compose_test_repositories") -rules_docker_compose_test_repositories() - -load("@rules_docker_compose_test//:setup.bzl", "rules_docker_compose_test_dependencies", "repo_absolute_path") -rules_docker_compose_test_dependencies() -repo_absolute_path(name="repo_absolute_path") diff --git a/repositories.bzl b/repositories.bzl deleted file mode 100644 index 4557907..0000000 --- a/repositories.bzl +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2023, Salesforce, Inc. -# SPDX-License-Identifier: Apache-2 - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -load("@bazel_tools//tools/build_defs/repo:http.bzl", _http_archive = "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -def http_archive(name, **kwargs): - maybe(_http_archive, name = name, **kwargs) - -def rules_docker_compose_test_repositories(): - http_archive( - name = "rules_pkg", - urls = [ - "https://github.com/bazelbuild/rules_pkg/releases/download/0.10.1/rules_pkg-0.10.1.tar.gz", - ], - sha256 = "d250924a2ecc5176808fc4c25d5cf5e9e79e6346d79d5ab1c493e289e722d1d0", - ) - - http_archive( - name = "rules_oci", - sha256 = "1bd16e455278d523f01326e0c3964cd64d7840a7e99cdd6e2617e59f698f3504", - strip_prefix = "rules_oci-2.2.0", - url = "https://github.com/bazel-contrib/rules_oci/releases/download/v2.2.0/rules_oci-v2.2.0.tar.gz", - ) - - http_archive( - name = "rules_go", - sha256 = "f4a9314518ca6acfa16cc4ab43b0b8ce1e4ea64b81c38d8a3772883f153346b8", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.50.1/rules_go-v0.50.1.zip", - ], - ) From 1ff1babb0fb2ef409e88ef74d68a4ed0ce79878a Mon Sep 17 00:00:00 2001 From: Kris Foster Date: Mon, 13 Jan 2025 13:02:32 +0000 Subject: [PATCH 2/2] bump version --- MODULE.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index e240deb..8977e6e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -15,7 +15,7 @@ module( name = "rules_docker_compose_test", - version = "1.0.0", + version = "1.1.0", ) bazel_dep(name = "rules_pkg", version = "0.10.1")