feat: build command (#24)

* feat: build command

Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>

* fix: docs

Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>

* fix: missing punctuation

Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>

* refactor: move mock to its own package

This allows `go mod tidy` to run successfully while keeping Gazelle
happy.

Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>

* fix: use proper arguments on tests

Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>

* feat: propagate bazel exit code to aspect exit

Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>

* fix: tests with ExitError

Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>

* fix: command description

Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
21 files changed
tree: 148b797090bdf6a1ef32020f6a9b0bced3023a84
  1. .github/
  2. buildinfo/
  3. cmd/
  4. docs/
  5. hooks/
  6. integration_tests/
  7. pkg/
  8. .bazelrc
  9. .bazelversion
  10. .gitignore
  11. .pre-commit-config.yaml
  12. .prettierignore
  13. .prettierrc
  14. BUILD.bazel
  15. CONTRIBUTING.md
  16. go.bzl
  17. go.mod
  18. go.sum
  19. LICENSE
  20. README.md
  21. WORKSPACE
README.md

aspect-cli

This is the frontend for the Aspect build tool. It is currently just a wrapper around bazelisk or bazel, meant to install in tools/bazel.

In the future, we might totally replace the bazel C++ client, and this tool would be a gRPC client of the bazel server.

TODOs

  • [ ] figure out how to cut and host a release GH Action to cut/publish release whenever a tag is pushed upstream
  • [ ] document lots of ways to install, including a bash one-liner
  • [ ] help user ensure bash/zsh completion working
  • [ ] warn user if Bazel version is floating (no bazelisk, or using latest in .bazelversion, or no .bazelversion)

Use Cases

When I am confused by bazel

I can find that Aspect is an easier-to-use wrapper and feel motivated and comfortable to try it immediately.

From aspect.build/install I quickly pick an Installation option, and am guided through to successful install.

The first time I run aspect in interactive mode,

  • I choose whether I want to install for all users of my workspace, in which case a bootstrap bit is added to tools/bazel ensuring that the tool is downloaded and spawned for anyone cloning my repo.

When I run bare bazel

When I run bare bazel build

When I run bare bazel test