sourcegraph/dev/sg/tail/BUILD.bazel
Jean-Hadrien Chabran bc4acd1fbd
feat(local): sg tail (#64146)
This PR brings back https://github.com/sourcegraph/sgtail back in `sg`,
plus a few adjustments to make it easier to use. I'll archive that repo
once this PR lands.

@camdencheek mentioned you here as you've been the most recent beta
tester, it's more an FYI than a request for a review, though it's
welcome if you want to spend a bit of time reading this.

Closes DINF-155

## Test plan

Locally tested + new unit test + CI

## Changelog

- Adds a new `sg tail` command that provides a better UI to tail and
filter log messages from `sg start --tail`.
2024-07-30 14:03:27 +02:00

38 lines
1.0 KiB
Python

load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("//dev:go_defs.bzl", "go_test")
go_library(
name = "tail",
srcs = [
"activity.go",
"commands.go",
"help.go",
"model.go",
"socket.go",
"styles.go",
"tail.go",
],
importpath = "github.com/sourcegraph/sourcegraph/dev/sg/tail",
tags = [TAG_INFRA_DEVINFRA],
visibility = ["//visibility:public"],
deps = [
"//dev/sg/internal/category",
"//lib/errors",
"@com_github_charmbracelet_bubbles//help",
"@com_github_charmbracelet_bubbles//key",
"@com_github_charmbracelet_bubbles//textinput",
"@com_github_charmbracelet_bubbles//viewport",
"@com_github_charmbracelet_bubbletea//:bubbletea",
"@com_github_charmbracelet_lipgloss//:lipgloss",
"@com_github_grafana_regexp//:regexp",
"@com_github_urfave_cli_v2//:cli",
],
)
go_test(
name = "tail_test",
srcs = ["activity_test.go"],
embed = [":tail"],
tags = [TAG_INFRA_DEVINFRA],
)