github.phpd.cn/thought-machine/please@v12.2.0+incompatible/src/help/BUILD (about) 1 genrule( 2 name = 'rule_defs', 3 srcs = [ 4 'process.py', 5 '//src/parse/args', 6 ], 7 outs = ['rule_defs.json'], 8 cmd = 'python $SRCS > $OUT', 9 ) 10 11 # We embed machine-readable information about the rules into the binary. 12 # Conceptually we could get the interpreter to read back their docstrings 13 # but we'd rather avoid the cgo link for that, and this embedding is 14 # easy enough. 15 go_bindata( 16 name = 'data', 17 srcs = [ 18 'misc.json', 19 ':config_json', 20 ':rule_defs', 21 ], 22 compress = True, 23 ) 24 25 go_library( 26 name = 'help', 27 srcs = [ 28 'completion.go', 29 'help.go', 30 ':data', 31 ], 32 deps = [ 33 '//src/cli', 34 '//src/utils', 35 '//third_party/go:go-flags', 36 '//third_party/go:logging', 37 ], 38 visibility = ['PUBLIC'], 39 ) 40 41 go_test( 42 name = 'help_test', 43 srcs = ['help_test.go'], 44 deps = [ 45 ':help', 46 '//third_party/go:testify', 47 ], 48 ) 49 50 genrule( 51 name = 'config_json', 52 outs = ['config.json'], 53 cmd = '$TOOL > $OUTS', 54 tools = ['//src/help/config:config_help'], 55 )