|
| 1 | +load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") |
| 2 | + |
| 3 | +go_library( |
| 4 | + name = "src_lib", |
| 5 | + srcs = [ |
| 6 | + "admin.go", |
| 7 | + "admin_create.go", |
| 8 | + "api.go", |
| 9 | + "batch.go", |
| 10 | + "batch_apply.go", |
| 11 | + "batch_common.go", |
| 12 | + "batch_exec.go", |
| 13 | + "batch_new.go", |
| 14 | + "batch_preview.go", |
| 15 | + "batch_remote.go", |
| 16 | + "batch_repositories.go", |
| 17 | + "batch_validate.go", |
| 18 | + "cmd.go", |
| 19 | + "code_intel.go", |
| 20 | + "code_intel_upload.go", |
| 21 | + "code_intel_upload_flags.go", |
| 22 | + "codeowners.go", |
| 23 | + "codeowners_create.go", |
| 24 | + "codeowners_delete.go", |
| 25 | + "codeowners_get.go", |
| 26 | + "codeowners_update.go", |
| 27 | + "colors.go", |
| 28 | + "config.go", |
| 29 | + "config_edit.go", |
| 30 | + "config_get.go", |
| 31 | + "config_list.go", |
| 32 | + "debug.go", |
| 33 | + "debug_common.go", |
| 34 | + "debug_compose.go", |
| 35 | + "debug_kube.go", |
| 36 | + "debug_server.go", |
| 37 | + "doc.go", |
| 38 | + "extensions.go", |
| 39 | + "extensions_copy.go", |
| 40 | + "extensions_delete.go", |
| 41 | + "extensions_get.go", |
| 42 | + "extensions_list.go", |
| 43 | + "extensions_publish.go", |
| 44 | + "extsvc.go", |
| 45 | + "extsvc_create.go", |
| 46 | + "extsvc_edit.go", |
| 47 | + "extsvc_list.go", |
| 48 | + "format.go", |
| 49 | + "headers.go", |
| 50 | + "login.go", |
| 51 | + "lsif.go", |
| 52 | + "main.go", |
| 53 | + "orgs.go", |
| 54 | + "orgs_create.go", |
| 55 | + "orgs_delete.go", |
| 56 | + "orgs_get.go", |
| 57 | + "orgs_list.go", |
| 58 | + "orgs_members.go", |
| 59 | + "orgs_members_add.go", |
| 60 | + "orgs_members_remove.go", |
| 61 | + "repos.go", |
| 62 | + "repos_add_metadata.go", |
| 63 | + "repos_delete.go", |
| 64 | + "repos_delete_metadata.go", |
| 65 | + "repos_get.go", |
| 66 | + "repos_list.go", |
| 67 | + "repos_update_metadata.go", |
| 68 | + "search.go", |
| 69 | + "search_alert.go", |
| 70 | + "search_stream.go", |
| 71 | + "servegit.go", |
| 72 | + "snapshot.go", |
| 73 | + "snapshot_databases.go", |
| 74 | + "snapshot_restore.go", |
| 75 | + "snapshot_summary.go", |
| 76 | + "snapshot_testcmd.go", |
| 77 | + "snapshot_upload.go", |
| 78 | + "team_members_list.go", |
| 79 | + "teams.go", |
| 80 | + "teams_create.go", |
| 81 | + "teams_delete.go", |
| 82 | + "teams_list.go", |
| 83 | + "teams_members.go", |
| 84 | + "teams_members_add.go", |
| 85 | + "teams_members_remove.go", |
| 86 | + "teams_update.go", |
| 87 | + "users.go", |
| 88 | + "users_create.go", |
| 89 | + "users_delete.go", |
| 90 | + "users_get.go", |
| 91 | + "users_list.go", |
| 92 | + "users_prune.go", |
| 93 | + "users_tag.go", |
| 94 | + "validate.go", |
| 95 | + "validate_install.go", |
| 96 | + "validate_kube.go", |
| 97 | + "version.go", |
| 98 | + ], |
| 99 | + importpath = "github.com/sourcegraph/src-cli/cmd/src", |
| 100 | + visibility = ["//visibility:private"], |
| 101 | + deps = [ |
| 102 | + "//internal/api", |
| 103 | + "//internal/batches", |
| 104 | + "//internal/batches/docker", |
| 105 | + "//internal/batches/executor", |
| 106 | + "//internal/batches/graphql", |
| 107 | + "//internal/batches/log", |
| 108 | + "//internal/batches/repozip", |
| 109 | + "//internal/batches/service", |
| 110 | + "//internal/batches/ui", |
| 111 | + "//internal/batches/watchdog", |
| 112 | + "//internal/batches/workspace", |
| 113 | + "//internal/cmderrors", |
| 114 | + "//internal/codeintel", |
| 115 | + "//internal/exec", |
| 116 | + "//internal/instancehealth", |
| 117 | + "//internal/pgdump", |
| 118 | + "//internal/servegit", |
| 119 | + "//internal/streaming", |
| 120 | + "//internal/users", |
| 121 | + "//internal/validate/install", |
| 122 | + "//internal/validate/kube", |
| 123 | + "//internal/version", |
| 124 | + "@com_github_dustin_go_humanize//:go-humanize", |
| 125 | + "@com_github_google_go_cmp//cmp", |
| 126 | + "@com_github_grafana_regexp//:regexp", |
| 127 | + "@com_github_jedib0t_go_pretty_v6//table", |
| 128 | + "@com_github_mattn_go_isatty//:go-isatty", |
| 129 | + "@com_github_pkg_browser//:browser", |
| 130 | + "@com_github_sourcegraph_conc//pool", |
| 131 | + "@com_github_sourcegraph_jsonx//:jsonx", |
| 132 | + "@com_github_sourcegraph_scip//bindings/go/scip", |
| 133 | + "@com_github_sourcegraph_sourcegraph_lib//batches", |
| 134 | + "@com_github_sourcegraph_sourcegraph_lib//batches/template", |
| 135 | + "@com_github_sourcegraph_sourcegraph_lib//codeintel/lsif/scip", |
| 136 | + "@com_github_sourcegraph_sourcegraph_lib//codeintel/upload", |
| 137 | + "@com_github_sourcegraph_sourcegraph_lib//errors", |
| 138 | + "@com_github_sourcegraph_sourcegraph_lib//output", |
| 139 | + "@com_google_cloud_go_storage//:storage", |
| 140 | + "@com_jaytaylor_html2text//:html2text", |
| 141 | + "@in_gopkg_yaml_v3//:yaml_v3", |
| 142 | + "@io_k8s_client_go//kubernetes", |
| 143 | + "@io_k8s_client_go//plugin/pkg/client/auth/azure", |
| 144 | + "@io_k8s_client_go//plugin/pkg/client/auth/gcp", |
| 145 | + "@io_k8s_client_go//tools/clientcmd", |
| 146 | + "@io_k8s_client_go//util/homedir", |
| 147 | + "@org_golang_google_api//option", |
| 148 | + "@org_golang_google_protobuf//proto", |
| 149 | + "@org_golang_x_net//context", |
| 150 | + "@org_golang_x_sync//errgroup", |
| 151 | + "@org_golang_x_sync//semaphore", |
| 152 | + ], |
| 153 | +) |
| 154 | + |
| 155 | +go_binary( |
| 156 | + name = "src", |
| 157 | + embed = [":src_lib"], |
| 158 | + visibility = ["//visibility:public"], |
| 159 | +) |
| 160 | + |
| 161 | +go_test( |
| 162 | + name = "src_test", |
| 163 | + srcs = [ |
| 164 | + "code_intel_upload_flags_test.go", |
| 165 | + "extensions_publish_test.go", |
| 166 | + "headers_test.go", |
| 167 | + "login_test.go", |
| 168 | + "main_test.go", |
| 169 | + "search_alert_test.go", |
| 170 | + "search_stream_test.go", |
| 171 | + "search_test.go", |
| 172 | + ], |
| 173 | + data = glob(["testdata/**"]), |
| 174 | + embed = [":src_lib"], |
| 175 | + deps = [ |
| 176 | + "//internal/api", |
| 177 | + "//internal/cmderrors", |
| 178 | + "//internal/streaming", |
| 179 | + "@com_github_google_go_cmp//cmp", |
| 180 | + "@com_github_grafana_regexp//:regexp", |
| 181 | + "@com_github_hexops_autogold//:autogold", |
| 182 | + "@com_github_sourcegraph_scip//bindings/go/scip", |
| 183 | + "@com_github_stretchr_testify//require", |
| 184 | + "@org_golang_google_protobuf//proto", |
| 185 | + ], |
| 186 | +) |
0 commit comments