essentially all I want is cp -r src/ dist/
, but for some reason I simply cannot get this to work.
Currently I am trying:
filegroup(
name = "src_files",
srcs = glob([
"src/**",
]),
)
filegroup(
name = "dist_files",
srcs = glob([
"dist/**"
]),
)
genrule(
name = "copy",
srcs = ["//packages/variables:src_files"],
outs = ["//packages/variables:dist_files"],
cmd = "cp -R $(locations //packages/variables:src_files) $(locations //packages/variables:dist_files)"
)
I've gone through at least 4 pages of google and the docs, but it seems unless I create a genrule and manually specify all 100 files in the rule it won't work?
@JamesSharpe had what I was missing, updated the BUILD file to:
And was able to successfully pass this on to the downstream rule.