Skip to content

Commit

Permalink
refactor: migrate and remove rules_pact
Browse files Browse the repository at this point in the history
  • Loading branch information
opicaud committed Oct 27, 2023
1 parent aea529e commit c5d08e4
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 766 deletions.
14 changes: 10 additions & 4 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
module(
name="monorepo",
version=""
)
bazel_dep(name = "events", version = "")
local_path_override(
module_name = "events",
Expand All @@ -15,10 +19,12 @@ local_path_override(
)
bazel_dep(name = "platforms", version = "0.0.7")

bazel_dep(name = "rules_pact", version = "")
local_path_override(
bazel_dep(name = "rules_pact", version = "1.0.0")
archive_override(
module_name = "rules_pact",
path = "rules_pact",
urls = ["https://github.com/opicaud/rules_pact/archive/refs/tags/v1.0.0.tar.gz"],
strip_prefix = "rules_pact-1.0.0",
integrity = "sha256-GqWy8GzwY7RHhmt2lVRSQ2absC3Z5rnP698foezdfY8=",
)
bazel_dep(name = "hack", version = "")
local_path_override(
Expand Down Expand Up @@ -112,7 +118,7 @@ use_repo(oci, "distroless_go")
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.module_override(
patches = [
"//rules_pact/lib:pact_ffi.patch",
"//pact-helper:pact_ffi.patch",
],
path = "github.com/pact-foundation/pact-go/v2",
)
Expand Down
24 changes: 24 additions & 0 deletions pact-helper/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
alias(
name = "pact_ffi",
actual = select({
":macos": "@pact_reference_osx_x86_64_toolchain//:pact_ffi_darwin_amd64",
":linux": "@pact_reference_linux_x86_64_toolchain//:pact_ffi_linux_amd64",
}),
visibility = ["//visibility:public"],
)

config_setting(
name = "macos",
constraint_values = [
"@platforms//os:macos",
"@platforms//cpu:x86_64",
]
)

config_setting(
name = "linux",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
]
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
+
+cc_import(
+ name = "pact_ffi_cc_import",
+ shared_library = "@@//rules_pact:pact_ffi",
+ shared_library= "@@//pact-helper:pact_ffi",
+ visibility = ["//visibility:public"],
+)
\ No newline at end of file
2 changes: 0 additions & 2 deletions rules_pact/.gitignore

This file was deleted.

72 changes: 0 additions & 72 deletions rules_pact/BUILD.bazel

This file was deleted.

29 changes: 0 additions & 29 deletions rules_pact/MODULE.bazel

This file was deleted.

140 changes: 0 additions & 140 deletions rules_pact/README.md

This file was deleted.

Empty file removed rules_pact/WORKSPACE
Empty file.
21 changes: 0 additions & 21 deletions rules_pact/defs.bzl

This file was deleted.

10 changes: 0 additions & 10 deletions rules_pact/extensions.bzl

This file was deleted.

Empty file removed rules_pact/lib/BUILD.bazel
Empty file.
3 changes: 0 additions & 3 deletions rules_pact/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions rules_pact/private/BUILD.bazel

This file was deleted.

Loading

0 comments on commit c5d08e4

Please sign in to comment.