forked from bazelruby/rules_ruby
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathWORKSPACE
133 lines (95 loc) · 3.32 KB
/
WORKSPACE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
workspace(name = "rules_ruby")
load("@//ruby:deps.bzl", "rules_ruby_dependencies")
rules_ruby_dependencies()
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
load("@bazel_skylib//lib:versions.bzl", "versions")
versions.check("3.4.1")
load("@rules_ruby//ruby:defs.bzl", "ruby_runtime")
# Register the system ruby version with a custom name.
ruby_runtime(
name = "system_ruby_custom",
version = "system",
)
register_toolchains("@system_ruby_custom//:toolchain")
# Register a versioned ruby with a custom name.
ruby_runtime(
name = "ruby3",
version = "ruby-3.0",
)
register_toolchains("@ruby3//:toolchain")
# Register a versioned ruby with its default name.
ruby_runtime("jruby-9.4")
register_toolchains("@jruby-9.4//:toolchain")
local_repository(
name = "rules_ruby_ruby_tests_testdata_another_workspace",
path = "ruby/tests/testdata/another_workspace",
)
local_repository(
name = "rules_ruby_ruby_tests_testdata_bundle_includes_workspace",
path = "ruby/tests/testdata/bundle_includes_workspace",
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# installing go for buildifier
http_archive(
name = "io_bazel_rules_go",
sha256 = "8663604808d2738dc615a2c3eb70eba54a9a982089dd09f6ffe5d0e75771bc4f",
urls = [
"https://github.com/bazelbuild/rules_go/releases/download/v0.23.6/rules_go-v0.23.6.tar.gz",
],
)
git_repository(
name = "bazel_gazelle",
commit = "c00612418c4dbc9f3cd35fe71fe1147748048b69",
remote = "https://github.com/bazelbuild/bazel-gazelle",
)
git_repository(
name = "com_google_protobuf",
commit = "6c61c1e63b9be3c36db6bed19032dfc0d63aadda",
remote = "https://github.com/protocolbuffers/protobuf",
shallow_since = "1558721209 -0700",
)
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies()
go_register_toolchains(go_version = "1.14.6")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
# rules_docker
http_archive(
name = "io_bazel_rules_docker",
sha256 = "4521794f0fba2e20f3bf15846ab5e01d5332e587e9ce81629c7f96c793bb7036",
strip_prefix = "rules_docker-0.14.4",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.14.4/rules_docker-v0.14.4.tar.gz"],
)
load(
"@io_bazel_rules_docker//repositories:repositories.bzl",
container_repositories = "repositories",
)
container_repositories()
load("@io_bazel_rules_docker//repositories:deps.bzl", container_deps = "deps")
container_deps()
load(
"@io_bazel_rules_docker//container:container.bzl",
"container_pull",
)
container_pull(
name = "ruby_base_container",
digest = "sha256:da560e130d6a4b75b099e932a98331ec3b2420b914d51a88edc4fe3c60aee9b1", # alpine linux/amd64
registry = "docker.io",
repository = "library/ruby",
)
load("@system_ruby_custom//:bundle.bzl", "ruby_bundle")
ruby_bundle(
name = "bundle",
bundler_version = "2.4.22",
excludes = {
"mini_portile": ["test/**/*"],
},
gemfile = "//:Gemfile",
gemfile_lock = "//:Gemfile.lock",
)
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()