-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathBUILD
More file actions
84 lines (76 loc) · 1.68 KB
/
BUILD
File metadata and controls
84 lines (76 loc) · 1.68 KB
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
load("@aspect_bazel_lib//lib:expand_template.bzl", "expand_template")
load("@aspect_bazel_lib//lib:paths.bzl", "BASH_RLOCATION_FUNCTION")
load(
"@rules_ruby//ruby:defs.bzl",
"rb_binary",
"rb_gem_build",
"rb_gem_install",
"rb_gem_push",
"rb_test",
)
load("@rules_shell//shell:sh_test.bzl", "sh_test")
package(default_visibility = ["//:__subpackages__"])
expand_template(
name = "shell_wrapper",
out = "wrapper.sh",
data = [
":Rakefile",
":rake",
],
substitutions = {
"@@rlocation_lib@@": BASH_RLOCATION_FUNCTION.replace("$", "$$"),
"@@rake_binary@@": "$(rlocationpaths :rake)",
"@@rakefile@@": "$(rlocationpaths :Rakefile)",
},
template = "wrapper.tpl.sh",
)
sh_test(
name = "shell_wrapper_test",
srcs = [":shell_wrapper"],
data = [
":Rakefile",
":rake",
],
tags = ["bcr-presubmit-failure"],
deps = ["@bazel_tools//tools/bash/runfiles"],
)
rb_binary(
name = "rake",
main = "@bundle//bin:rake",
deps = [
"//lib:gem",
"@bundle",
],
)
rb_test(
name = "rubocop",
size = "small",
timeout = "moderate", # JRuby startup can be slow
data = [
".rubocop.yml",
"Gemfile",
],
main = "@bundle//bin:rubocop",
tags = ["no-sandbox"],
deps = [
"//lib:gem",
"//spec:add",
"//spec:env",
"//spec:subtract",
"//spec:support",
"@bundle",
],
)
rb_gem_build(
name = "gem-build",
gemspec = "gem.gemspec",
deps = ["//lib:gem"],
)
rb_gem_install(
name = "gem-install",
gem = ":gem-build",
)
rb_gem_push(
name = "gem-release",
gem = ":gem-build",
)