github.com/please-build/go-rules/tools/please_go@v0.0.0-20240319165128-ea27d6f5caba/BUILD (about) 1 subinclude("//build_defs:go") 2 3 go_binary( 4 name = "please_go", 5 srcs = [ 6 "please_go.go", 7 ], 8 labels = ["link:plz-out/please"], 9 visibility = ["PUBLIC"], 10 deps = [ 11 "//third_party/go:flags", 12 "//tools/please_go/cover", 13 "//tools/please_go/covervars", 14 "//tools/please_go/embed", 15 "//tools/please_go/filter", 16 "//tools/please_go/generate", 17 "//tools/please_go/goget", 18 "//tools/please_go/install", 19 "//tools/please_go/modinfo", 20 "//tools/please_go/packageinfo", 21 "//tools/please_go/test", 22 ], 23 ) 24 25 genrule( 26 name = "bootstrap", 27 srcs = [ 28 "go.mod", 29 "go.sum", 30 "please_go.go", 31 ], 32 outs = ["please_go.bootstrap"], 33 binary = True, 34 cmd = "(cd $PKG_DIR && $TOOL build please_go.go && mv please_go $OUT && $TOOL clean -modcache) || ($TOOL clean -modcache; exit 1)", 35 requires = ["go_src"], 36 sandbox = False, 37 tools = [CONFIG.GO.GO_TOOL], 38 visibility = ["PUBLIC"], 39 deps = [ 40 "//tools/please_go/cover:srcs", 41 "//tools/please_go/covervars:srcs", 42 "//tools/please_go/embed:srcs", 43 "//tools/please_go/filter:srcs", 44 "//tools/please_go/generate:srcs", 45 "//tools/please_go/generate/gomoddeps:srcs", 46 "//tools/please_go/goget:srcs", 47 "//tools/please_go/install:srcs", 48 "//tools/please_go/install/exec:srcs", 49 "//tools/please_go/install/toolchain:srcs", 50 "//tools/please_go/modinfo:srcs", 51 "//tools/please_go/packageinfo:srcs", 52 "//tools/please_go/test:srcs", 53 ], 54 ) 55 56 genrule( 57 name = "version", 58 srcs = ["VERSION"], 59 outs = ["version.build_defs"], 60 cmd = "echo PLEASE_GO_VERSION = \\\"$(cat $SRCS)\\\" > $OUT", 61 visibility = [ 62 "//package:all", 63 "//tools:all", 64 ], 65 )